Mike Emmel wrote:
> I'm running into some fascinating problems related to forking.
> 
> I found this.
> 
> pthread_atfork
> 
> In my particular case I'm having some problems with the X11 demo back
> end related to
> XShm getting munged after a fork.
> 
> But I'm not clear on whats going on but since DirectFB is multi
> threads we may need to consider
> if a few more pthreads_atforks are  needed.

I did not test the FFA_FORK mode with DirectFB at all. I just used it in
test application for the Fusion library or in other projects using Fusion
for higher level IPC libraries.

But it would be interesting if e.g. one application creates and uses a window,
then forks and both processes would continue to use the window, surface or
receive events for it. It should work...

> Googling did not reveal if something needs to be done.  I did not find
> any use of pthread_atfork in the X11 server either.

I'd check for fork() after connecting to the server in an X11 *client*.

Is that supported? What happens with sockets? Two processes should not
be allowed to receive the same data, should they? I can't imagine there's
code in the kernel that "copies" the data to both processes. The server
would also have to give the "new" client another client id, like they get
a new Fusion ID after forking with FFA_FORK :)

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to