[libvirt] [PATCH v2] virCommandExec: Report error if execve fails

Martin Kletzander mkletzan at redhat.com
Tue Jul 12 10:06:14 UTC 2016


On Mon, Jul 11, 2016 at 07:06:04PM +0200, Michal Privoznik wrote:
>In an unlikely event of execve() failing, the virCommandExec()
>function does not report any error, even though checks that are
>at the beginning of the function are verbose when failing.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
>
>diff to v1:
>- Fixed the test (used virFork() instead of plain fork(),
>                  prolonged the waiting time for child reply, ...)

Good, that was most probably the case.  Since the wait occurs only in
the failure scenario I have no problem with it being pretty long.  It's
still just a second and that should do, so I think this is perfect
middle ground.

If it wasn't in tests I would suggest using poll() instead of actually
actively polling, but in this case I think it would only complicate
things.

ACK.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160712/ddfc91fd/attachment-0001.sig>


More information about the libvir-list mailing list