[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: off-topic: need help with fork and Xlib error
From:       Waldo Bastian <bastian () ens ! ascom ! ch>
Date:       1999-06-02 9:01:08
[Download RAW message or body]

Stefan van den Oord wrote:
> 
> On Tue, 01 Jun 1999, Waldo Bastian wrote:
> > > The child process inherits the file descriptor, and parent and child
> > > both write to the X server. So the poor server gets multiple requests
> > > on the same pipe and this confuses him.
> >
> > Ah of course! The QMessageBox is launched from the other thread! I was
> > thinking that somehow the "exit(1)" fiddled with the fd's which came to
> > me as unlikely.
> 
> I'm sorry, but that cannot be it. Just this code gives the error as
> well:
> 
> if ( fork() )
> {
>     /* child process */
>     exit ( 1 );
> }
> 
> I didn't call QMessageBox yet when I got the error...

Hm... That's weird.. In that case you should try to close filedescriptors 
before you run the child.

Cheers,
Waldo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic