Re: [PATCH 5/6] virtlockd: make re-exec more robust

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

 



On Mon, Dec 09, 2013 at 05:23:29PM +1100, Michael Chapman wrote:
> virtlockd's argv[0] may not contain a full path to the binary, however
> it should contain something that can be looked up in the PATH. Use
> execvp() to do path lookup when re-executing ourselves.
> 
> After re-execution, we must not attempt to daemonize again. It's not
> only unnecessary, but it also means we end up with the wrong PID and so
> we can't validate the state file.
> 
> Instead, build a new argv for the new program that does not include
> --daemon.

It would seem to be simpler to instead change the main() method
so that --daemon is ignored when re-exec'ing.

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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]