[CRIU] [PATCH 0/2] don't chdir to / when service/page-server going daemon
Pavel Emelyanov
xemul at parallels.com
Fri Oct 25 06:12:08 PDT 2013
On 10/25/2013 05:09 PM, Ruslan Kuprieiev wrote:
> On 24.10.2013 16:22, Pavel Emelyanov wrote:
>> On 10/21/2013 02:24 PM, Ruslan Kuprieiev wrote:
>>> Hi!
>>>
>>> If we're doing chdir to / when going daemon, we get headache with path resolving for, for example, pidfile.
>> What kind of headache?
>>
>>> So don't chdir to / when going daemon.
>>>
>>> Ruslan Kuprieiev (2):
>>> don't change dir to / when going deamon
>>> don't change dir to / when going deamon
>>>
>>> cr-service.c | 2 +-
>>> page-xfer.c | 2 +-
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>
>
> If pidfile path isn't absolute, and server is going daemon, we need to
> resolve somehow this path. I found nothing easier than just do not chdir
> to /. Btw, why do we even need to go to /?
It's a standard practice to chdir("/") on daemons, e.g. not to block
umounting of an FS that was in cwd when we started it.
More information about the CRIU
mailing list