]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: make it easier to reflect child exit status
authorEric Blake <eblake@redhat.com>
Thu, 20 Feb 2014 03:04:40 +0000 (20:04 -0700)
committerEric Blake <eblake@redhat.com>
Mon, 3 Mar 2014 19:40:31 +0000 (12:40 -0700)
commit2b4f162eb4ca0f161fbdb66c5814cd02bfa665ca
treea117e5343dab6fc07ddbe9c2ffefb4aee4aaab27
parent631923e7f2637c4b74e2e47918e327f87cb1e1a4
util: make it easier to reflect child exit status

Thanks to namespaces, we have a couple of places in the code
base that want to reflect a child exit status, including the
ability to detect death by a signal, back to a grandparent.
Best to make it a reusable function.

* src/util/virprocess.h (virProcessExitWithStatus): New prototype.
* src/libvirt_private.syms (util/virprocess.h): Export it.
* src/util/virprocess.c (virProcessExitWithStatus): New function.
* tests/commandtest.c (test23): Test it.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/libvirt_private.syms
src/util/virprocess.c
src/util/virprocess.h
tests/commandtest.c