On 01/13/2012 01:47 PM, Michael Tokarev wrote:
But instead of adding a chdir later, I'll try to rearrange code a bit
to do all init in the parent instead.

That's not possible, because when you fork you lose all threads except the main thread. That's why the daemon() was moved very early. Your patch is okay if you also add a chdir("/") later on.

Paolo

Reply via email to