On 12/27/2011 03:51 AM, Daniel Veillard wrote:
On Fri, Dec 23, 2011 at 02:13:53PM -0700, Eric Blake wrote:
> Valgrind detected a pipe fd leak before the parent exits on success,
> introduced in commit 4296cea; by itself, the leak is not bad, since
> we immediately called _exit(), but we might as well be clean to make
> valgrind analysis easier. Meanwhile, if the daemon grandchild detects
> an error, the parent failed to flush the error message before exiting.
> Also, we had the possibility of both parent and child returning to the
> caller, such that the user could see duplicated reports of failure
> from the two return paths. And we might as well be robust to the
> (unlikely) situation of being started with stdin closed.
>
> + if (ret != 1) {
> + fprintf(stderr,
> + _("%s: error: unable to determine if daemon is "
> + "running: %s\n"), argv0, strerror(errno));
> + exit(EXIT_FAILURE);
I switched this to virStrerror to appease 'make syntax-check'...
ACK to the Chrismas patch :-)
and pushed.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org