qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command
Date: Tue, 17 Jan 2012 12:27:33 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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" <address@hidden> 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 :|



reply via email to

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