Q: Tk's X errors

Greg McFarlane gregm at iname.com
Tue Feb 29 08:04:29 EST 2000


After you fork (but before you exec) the child must not communicate
with the X server.  What you are probably doing is give the user an
error message using a Tk widget.  A quick workaround is to do the
check and error message before the fork.

On 29 Feb, Sven Drescher wrote:
> Hallo!
> 
> I've written a programm to spawn a child and to kill this again. To do this
> I use fork() and execv(). Before I start the child I check with
> os.path.isfile(), wether the file exists. If the file exists, it will be
> started and all works fine. But if the file not exists, I do not the
> exec()-command and an error occured.
> 
> e.g.
>     X Error of failed request: BadIDChoice (invalid resource ID chosen for
> this connection)
>     Major opcode of failed request: ... (X_CreatePixmap)
>     Resource id in failed request: ...
>     Serial number of failed request: ...
>     Current serial number in output stream: ...
> 
> What did I wrong?
> 
> Thanks for help and hints!
> 
> Sven
> ______________________________________
> German Aerospace Research Establishment
> 
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list
> 

-- 
Greg McFarlane     INMS Telstra Australia     gregm at iname.com




More information about the Python-list mailing list