Re: [PATCH 2/3] fdstream: avoid child process leak on error

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

 



2011/7/12 Eric Blake <eblake@xxxxxxxxxx>:
> By requesting the pid in virCommandRunAsync, fdstream was claiming
> that it would manually wait for the process.  But on the failure
> path, the child process was being leaked.

This difference in behavior between virCommandRunAsync(..., NULL) and
virCommandRunAsync(..., &pid) is not documented on virCommandRunAsync
itself but only on virCommandFree. Also virCommandFree refers to
waitpid instead of you're newly added virPidWait. Finally I noticed
that the comments in command.h and command.c are out of sync (at least
for virCommandFree). Why are you documenting in two places making it
prone to get out of sync?

ACK, to this patch.

-- 
Matthias Bolte
http://photron.blogspot.com

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