On 03/23/2011 06:30 AM, Eric Blake wrote:
> We allow virCommandRunAsync to be used for daemonized
> commands, so I don't think it is safe to unconditionally
> kill off the PID when free'ing the virCommandPtr instance.
No, we don't. 'git grep virCommandRunAsync' shows that the only current
client is virsh.c. virCommandDaemonize is run synchronously (the daemon
grandchild is run async, but the intermediate child runs to completion
via virCommandRun).
In fact, I can mandate virCommandRun with daemonized children, to make
this impossible to reap the wrong child; v2 coming up later with that
change.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org