Re: [PATCHv2] daemon: clean up daemonization

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

 



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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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