fork with tk? 
Author Message
 fork with tk?

I'm trying to fork a command in my Perl/Tk application, the forking goes right
runs and exits. The problem occures when I make my the program active again with
my mouse. At this moment the program reports with the following error :
Xlib : unexpected async reply (sequence 0x13bd)!
X Error of failed request: BadIDChoice (invalid resource ID chosen for this
connection)
Major opcode of failed request : 53 (X_CreatePixmap)
Resource id in failed request : 0x180005f
Serail number of failed request : 5057
Current serial number in output stream : 3620

What does this mean, and how can I prevent this from happening ?
The program part is as follows :

if ($pid = fork) {
        print("Child executed with pid $pid");

Quote:
}

else {
        'xterm -e do_info'

Quote:
}

P.D. do_info is the program I want to run i a xterm window.

Thanks in advance
Robbert



Mon, 19 Aug 2002 03:00:00 GMT  
 fork with tk?

Quote:

> I'm trying to fork a command in my Perl/Tk application, the forking goes right
> runs and exits. The problem occures when I make my the program active again with
> my mouse. At this moment the program reports with the following error :
> Xlib : unexpected async reply (sequence 0x13bd)!
> X Error of failed request: BadIDChoice (invalid resource ID chosen for this
> connection)
> Major opcode of failed request : 53 (X_CreatePixmap)
> Resource id in failed request : 0x180005f
> Serail number of failed request : 5057
> Current serial number in output stream : 3620

> What does this mean, and how can I prevent this from happening ?
> The program part is as follows :

> if ($pid = fork) {
>    print("Child executed with pid $pid");
> }
> else {
>    'xterm -e do_info'
> }

You have to exit the child process with CORE::exit(). And note that
only one of the both processes should access the Tk internals.

Regards,
        Slaven

--
use Tk;$c=tkinit->Canvas(-he,20)->grid;$x=5;map{s!\n!!g;map{create$c 'line'=>
map{$a=-43+ord;($x+($a>>3)*2=>5+($a&7)*2)}split''}split"!";$x+=12}split/_/=>'K
PI1_+09IPK_K;-OA1_+K!;A__1;Q!7G_1+QK_3CLPI90,_+K!;A_+1!KQ!.N_K+1Q!.F_1+KN.Q__1+
KN._K+1Q!.F_1+KN.Q_+1Q__+1!KQ!.N_1;Q!7G_K3,09Q_+1!K.Q_K+1Q!.F_1+KN.Q_';MainLoop



Mon, 19 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. fork and Tk

2. Forks with Tk/Win32

3. fork and tk

4. Fork and Tk on Win32 ActiveState 5.6.1

5. How to fork in Tk; a better way to do this?

6. Fork in background from a script in perl/Tk on remote station (rsh)

7. Using fork in perl w/ tk extension.

8. perl/tk and fork command on windows

9. Perl/TK and Fork

10. Fork in background from a script in perl/Tk on remote station (rsh)

11. Perl/Tk - Fork Failure - Repost (ex)

12. forking in Perl/Tk

 

 
Powered by phpBB® Forum Software