[libvirt] [PATCH] util: virExec: Dispatch all errors raised after fork
Eric Blake
eblake at redhat.com
Wed Jun 30 21:02:10 UTC 2010
On 06/30/2010 02:38 PM, Cole Robinson wrote:
> Any error message raised after the process has forked needs
> to be followed by virDispatchError, otherwise we have no chance of
> ever seeing it. This was selectively done for hook functions in the past,
> but really applies to all post-fork errors.
>
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
> src/util/util.c | 26 ++++++++++++++------------
> 1 files changed, 14 insertions(+), 12 deletions(-)
ACK, but let's fix a nit first...
>
> + fork_error:
> + virDispatchError(NULL);
> _exit(1);
...while you're touching this, it's better to use _exit(EXIT_FAILURE)
than _exit(1).
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100630/a02a07fb/attachment-0001.sig>
More information about the libvir-list
mailing list