From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn88k-0007wy-Dd for qemu-devel@nongnu.org; Tue, 17 Jan 2012 07:27:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rn88b-0006RA-GB for qemu-devel@nongnu.org; Tue, 17 Jan 2012 07:27:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn88b-0006R6-9f for qemu-devel@nongnu.org; Tue, 17 Jan 2012 07:27:41 -0500 Date: Tue, 17 Jan 2012 12:27:33 +0000 From: "Daniel P. Berrange" Message-ID: <20120117122733.GC14780@redhat.com> References: <1326744592-27650-1-git-send-email-lcapitulino@redhat.com> <1326744592-27650-3-git-send-email-lcapitulino@redhat.com> <20120116210627.GD12789@redhat.com> <20120117101834.731f847f@doriath> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120117101834.731f847f@doriath> Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: jcody@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com On Tue, Jan 17, 2012 at 10:18:34AM -0200, Luiz Capitulino wrote: > On Mon, 16 Jan 2012 21:06:27 +0000 > "Daniel P. Berrange" wrote: > > > + has_pmutils = find_executable_file(pmutils_bin, pmutils_path, > > > + sizeof(pmutils_path)); > > > + > > > + pid = fork(); > > > + if (pid == 0) { > > > + /* child */ > > > + int fd; > > > + const char *cmd; > > > + > > > + setsid(); > > > + reopen_fd_to_null(0); > > > + reopen_fd_to_null(1); > > > + reopen_fd_to_null(2); > > > + > > > + if (has_pmutils) { > > > + execle(pmutils_path, pmutils_bin, NULL, environ); > > > > You could just use execl() and drop the trailing 'environ' here, > > since that is the default anyway. > > execl() is not in the async-signal-safe list. It was not in POSIX.1-2004, but POSIX.1-2008 added it. I don't thing this is worth arguing over though, so just leave it as you have :-) Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|