fork in Photon

I’ve an application where i use the fork () function :


child_pid = fork ();

if (child_pid)
{
message_loop (); /* Send and Receive */
}

/* Here’s the child */

child_stuff_using_photon ();



It seems that i can’t continue using photon events in the child … My app
is created using phab.

Any thoughts ?

“Sebastien Cantos” <scantos@technodiva.com> wrote in message
news:atncfa$erj$1@inn.qnx.com

I’ve an application where i use the fork () function :


child_pid = fork ();

if (child_pid)
{
message_loop (); /* Send and Receive */
}

/* Here’s the child */

child_stuff_using_photon ();



It seems that i can’t continue using photon events in the child … My
app
is created using phab.

Any thoughts ?

Do not use Photon services in a forked process. Better have a single (main)
process which is responsible for all Photon GUI calls and maybe a set of
forked childs doing some jobs. At least this way it works fine for me.

// wbr