02.11.2016 12:39, Markus Armbruster wrote:
> Michael Tokarev <m...@tls.msk.ru> 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