Re: [libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Daniel P. Berrange
On Tue, Mar 22, 2011 at 04:45:09PM -0600, Eric Blake wrote: Sometimes, an asynchronous helper is started (such as a compressor or iohelper program), but a later error means that we want to abort that child. Make this easier. /* @@ -1207,6 +1208,8 @@ virCommandRunAsync(virCommandPtr cmd,

Re: [libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Eric Blake
On 03/23/2011 06:19 AM, Daniel P. Berrange wrote: On Tue, Mar 22, 2011 at 04:45:09PM -0600, Eric Blake wrote: Sometimes, an asynchronous helper is started (such as a compressor or iohelper program), but a later error means that we want to abort that child. Make this easier. /* @@ -1207,6

Re: [libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-23 Thread Eric Blake
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

[libvirt] [PATCH 3/1] command: add virCommandAbort for cleanup paths

2011-03-22 Thread Eric Blake
Sometimes, an asynchronous helper is started (such as a compressor or iohelper program), but a later error means that we want to abort that child. Make this easier. * src/util/command.h (virCommandAbort): New prototype. * src/util/command.c (_virCommand): Add new field. (virCommandRunAsync,