Suzuki K P wrote: > On Dec 14, 2007 8:51 AM, Denis Oliver Kropp <[EMAIL PROTECTED]> wrote: >> Suzuki K P wrote: >>> Hi Denis, >>> >>> I have confirmed that the problem is indeed due to the daemon() call >>> in the application. This would cause the application to do a fork() >>> and the child process will continue the execution. >>> >>> But the child closes its World as soon as it does a fork with the >>> pthread fork handler and later it goes on to access the freed data. >>> This causes the crash. >>> >>> What would be the best way to fix this issue ? How do we take care of >>> this special case of fork ? >> There's a call to change the behaviour. >> >> /* >> * Sets the fork() action of the calling Fusionee within the world. >> */ >> void fusion_world_set_fork_action( FusionWorld *world, >> FusionForkAction action ); >> >> typedef enum { >> FFA_CLOSE, >> FFA_FORK >> } FusionForkAction; >> >> >> You need to get the world from the DirectFB core: >> >> >> fusion_world_set_fork_action( dfb_core_world(NULL), FFA_FORK ); >> >> >> Please include <src/core.h> and <fusion/fusion.h> for this. >> >> >> I hope it helps, anyhow there should be an option for DirectFB to make it do >> that itself > > So, we have to link the fusion lib (+directfb) to the GTK application > directly and issue the call ?
Yes, or you patch dfb_core_create() to issue the call after fusion_world_enter(). -- 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