Received: from eggs.gnu.org ([2001:4830:134:3::10]:50873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1wRE-0003di-3Q for qemu-devel@nongnu.org; Wed, 02 Nov 2016 10:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1wRA-00011R-UZ for qemu-devel@nongnu.org; Wed, 02 Nov 2016 10:22:48 -0400 Date: Wed, 2 Nov 2016 14:22:39 +0000 From: "Daniel P. Berrange" Message-ID: <20161102142239.GA17900@redhat.com> Reply-To: "Daniel P. Berrange" References: <1478096330-18081-1-git-send-email-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1478096330-18081-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: Re: [Qemu-devel] [PATCH v2] vl.c: move pidfile creation up the line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, Markus Armbruster On Wed, Nov 02, 2016 at 05:18:50PM +0300, Michael Tokarev wrote: > 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. > > Move pid file creation earlier, right after the call > to os_daemonize(), where we know our process id (pid). > > Signed-off-by: Michael Tokarev > --- > vl.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|