libvirt/src/nwfilter
Eric Blake 208a044a54 command: properly diagnose process exit via signal
Child processes don't always reach _exit(); if they die from a
signal, then any messages should still be accurate.  Most users
either expect a 0 status (thankfully, if status==0, then
WIFEXITED(status) is true and WEXITSTATUS(status)==0 for all
known platforms) or were filtering on WIFEXITED before printing
a status, but a few were missing this check.  Additionally,
nwfilter_ebiptables_driver was making an assumption that works
on Linux (where WEXITSTATUS shifts and WTERMSIG just masks)
but fails on other platforms (where WEXITSTATUS just masks and
WTERMSIG shifts).

* src/util/command.h (virCommandTranslateStatus): New helper.
* src/libvirt_private.syms (command.h): Export it.
* src/util/command.c (virCommandTranslateStatus): New function.
(virCommandWait): Use it to also diagnose status from signals.
* src/security/security_apparmor.c (load_profile): Likewise.
* src/storage/storage_backend.c
(virStorageBackendQEMUImgBackingFormat): Likewise.
* src/util/util.c (virExecDaemonize, virRunWithHook)
(virFileOperation, virDirCreate): Likewise.
* daemon/remote.c (remoteDispatchAuthPolkit): Likewise.
* src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesExecCLI):
Likewise.
2011-03-25 05:34:48 -06:00
..
nwfilter_driver.c Avoid warnings from nwfilter driver when run non-root 2011-02-10 14:29:57 +00:00
nwfilter_driver.h filter new files through cppi, so syntax-check passes once again 2010-03-26 22:47:30 +01:00
nwfilter_ebiptables_driver.c command: properly diagnose process exit via signal 2011-03-25 05:34:48 -06:00
nwfilter_ebiptables_driver.h Prefer C style comments over C++ ones 2011-01-29 00:59:45 +01:00
nwfilter_gentech_driver.c fixes for several memory leaks 2011-03-04 09:52:12 -07:00
nwfilter_gentech_driver.h Allow hash tables to use generic pointers as keys 2011-02-25 13:00:54 +00:00
nwfilter_learnipaddr.c Allow hash tables to use generic pointers as keys 2011-02-25 13:00:54 +00:00
nwfilter_learnipaddr.h nwfilter: extend nwfilter reload support 2010-08-16 12:59:54 -04:00