libvirt/tools
Eric Blake 2ebf593a05 virsh: report exit status of failed lxc-enter-namespace
'virsh lxc-enter-namespace' does not have a way to reflect exit
status to the caller in single-command mode, but we might as well
at least report the exit status.  Prior to this patch,

$ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh 'exit 3'; echo $?
1

now it gives some details:

$ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh -c 'exit 3'; echo $?
error: internal error: Child process (31557) unexpected exit status 3
1

Also useful:

$ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh -c 'kill $$'; echo $?
error: internal error: Child process (31585) unexpected fatal signal 15
1

* tools/virsh-domain.c (cmdLxcEnterNamespace): Avoid magic numbers.
Dispatch any error.
* tools/virsh.pod: Document that non-zero exit status is collapsed.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-03-03 12:40:32 -07:00
..
wireshark maint: Fix minor typo (unkown) 2014-02-26 10:36:42 -07:00
libvirt_win_icon_16x16.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_32x32.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_48x48.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_64x64.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt-guests.init.in tools: Only install guests init script if --with-init=script=redhat 2012-12-11 19:54:37 -05:00
libvirt-guests.service.in Add Documentation fields to systemd service files 2014-01-09 09:32:55 +01:00
libvirt-guests.sh.in libvirt-guests: Wait for libvirtd to initialize 2014-02-24 10:54:37 +01:00
libvirt-guests.sysconf libvirt-guests: Add parallel startup and shutdown of guests 2012-03-05 13:18:24 +01:00
Makefile.am build: add $(prefix) to SYSTEMD_UNIT_DIR 2014-01-21 13:19:46 +02:00
virsh_win_icon.rc Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virsh-console.c virsh-console: Avoid using signal() in multithreaded application 2013-09-03 14:06:11 +02:00
virsh-console.h virsh: Rename vshMakeStdinRaw to vshTTYMakeRaw and move it to virsh.c 2013-09-03 14:06:11 +02:00
virsh-domain-monitor.c domblkstat: Produce error message that at least sounds like English 2014-02-28 10:06:27 +01:00
virsh-domain-monitor.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-domain.c virsh: report exit status of failed lxc-enter-namespace 2014-03-03 12:40:32 -07:00
virsh-domain.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-edit.c virsh: edit: don't leak XML string on reedit or redefine 2013-06-25 15:37:20 +02:00
virsh-host.c virsh: mark CPU usage field names as translatable 2014-02-25 08:32:11 +01:00
virsh-host.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-interface.c virsh-interface: Unify list column alignment 2013-11-13 10:07:32 +01:00
virsh-interface.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-network.c virsh: use more compact VIR_ENUM_IMPL 2014-02-24 11:47:18 -07:00
virsh-network.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-nodedev.c fix typo in lxc_driver.c and virsh-nodedev.c 2013-10-15 06:47:24 -06:00
virsh-nodedev.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-nwfilter.c virsh-nwfilter: Unify list command column alignment 2013-11-13 10:07:32 +01:00
virsh-nwfilter.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-pool.c virsh: kill over-engineered asprintf failure recovery 2014-02-24 11:47:18 -07:00
virsh-pool.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-secret.c virsh-secret: Unify list column alignment 2013-11-13 10:07:32 +01:00
virsh-secret.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-snapshot.c virsh: modify vshStringToArray to duplicate the elements too 2013-08-20 17:53:49 +02:00
virsh-snapshot.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-volume.c virsh: kill over-engineered asprintf failure recovery 2014-02-24 11:47:18 -07:00
virsh-volume.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh.c virsh: common code for waiting for an event 2014-02-20 16:23:27 -07:00
virsh.h virsh: common code for waiting for an event 2014-02-20 16:23:27 -07:00
virsh.pod virsh: report exit status of failed lxc-enter-namespace 2014-03-03 12:40:32 -07:00
virt-host-validate-common.c Introduce OOM reporting to virAsprintf 2013-07-10 11:07:31 +02:00
virt-host-validate-common.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-lxc.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-lxc.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-qemu.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-qemu.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-login-shell.c virt-login-shell: saner exit value 2014-03-03 12:40:32 -07:00
virt-login-shell.conf Introduce a virt-login-shell binary 2013-08-08 16:36:31 +01:00
virt-login-shell.pod virt-login-shell: saner exit value 2014-03-03 12:40:32 -07:00
virt-pki-validate.in virt-pki-validate: add --help/--version option 2013-08-19 20:25:53 -06:00
virt-sanlock-cleanup.in virt-sanlock-cleanup; Fix augtool usage 2013-08-28 13:50:10 +02:00
virt-xml-validate.in tools: add missing 'interface' type and update man page 2013-09-13 14:57:52 +02:00