|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH] do not chdir(/) in qemu-nbd |
Date: | Fri, 13 Jan 2012 14:41:24 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |