qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vl.c: move pidfile creation up


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH] vl.c: move pidfile creation up
Date: Wed, 2 Nov 2016 17:20:43 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

02.11.2016 12:39, Markus Armbruster wrote:
> Michael Tokarev <address@hidden> writes:
> 
>> With current code, pid file is open after various
>> sockets, chardevs, fsdevs and the like.  This causes
>> interesting effects, for example when monitor is a
>> unix-socket, and another qemu instance is already
>> running, new qemu first "damages" the socket and
>> next complain that it can't acquire the pid file and
>> exits, making running qemu unreachable.
..
> ... is this early enough?  For instance, we clobber the log file another
> 200 lines further up.

Yeah, you're right.  There's also some tracing initing in
there and other potentially interesting stuff.

I moved the pid file creation right after the os_daemonize()
call.  Before this point we don't even know our pid.

> A "don't clobber anything externally visible before this spot" comment
> could be useful.

Hopefully this is "early enough" to not need this comment :)

Thanks,

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]