diff options
author | Matthew Booth <mbooth@redhat.com> | 2010-08-26 15:08:20 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-08-26 15:53:25 +0100 |
commit | c3194e4d370d917db9900a31ea18f10492554da4 (patch) | |
tree | fde40f8d83827d7c8f61ac4a185b0728308116f1 /tools | |
parent | d3fc7e1e4d592dbdc6b8b9edf92dddc0a67eac28 (diff) | |
download | libguestfs-c3194e4d370d917db9900a31ea18f10492554da4.tar.gz libguestfs-c3194e4d370d917db9900a31ea18f10492554da4.tar.xz libguestfs-c3194e4d370d917db9900a31ea18f10492554da4.zip |
Ignore launch() error in virt-rescue. (RHBZ#618556)
launch() expects guestfsd to start, which it never does in virt-rescue, so it
always returns an error about the appliance shutting down unexpectedly.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/virt-rescue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/virt-rescue b/tools/virt-rescue index 1f292f60..51ac7606 100755 --- a/tools/virt-rescue +++ b/tools/virt-rescue @@ -19,6 +19,7 @@ use warnings; use strict; +use Errno; use Sys::Guestfs; use Sys::Guestfs::Lib qw(open_guest); use Pod::Usage; @@ -214,7 +215,11 @@ $g->set_append ($str); # Run the appliance. This won't return until the user quite the # appliance. -$g->launch (); +eval { $g->launch (); }; + +# launch() expects guestfsd to start. However, virt-rescue doesn't run guestfsd, +# so this will always fail with ECHILD when the appliance exits unexpectedly. +die $@ unless $!{ECHILD}; exit 0; |