X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=rescue%2Fvirt-rescue.c;h=7c8a57b355e59b768c3249870ff911e6453880b6;hb=bddde7799b80b8292879634548c3c92a3cc1c044;hp=911b80a1f2b0da2fada8872890b3ed82beeef033;hpb=6740028b333840eec5e8e46e8512f8155728b037;p=libguestfs.git diff --git a/rescue/virt-rescue.c b/rescue/virt-rescue.c index 911b80a..7c8a57b 100644 --- a/rescue/virt-rescue.c +++ b/rescue/virt-rescue.c @@ -29,6 +29,7 @@ #include #include +#include "ignore-value.h" #include "progname.h" #include "xvasprintf.h" @@ -289,17 +290,9 @@ main (int argc, char *argv[]) * appliance. */ guestfs_set_error_handler (g, NULL, NULL); - guestfs_launch (g); - /* launch() expects guestfsd to start. However, virt-rescue doesn't - * run guestfsd, so this will always fail with ECHILD when the - * appliance exits unexpectedly. - */ - if (errno != ECHILD) { - fprintf (stderr, "%s: %s\n", program_name, guestfs_last_error (g)); - guestfs_close (g); - exit (EXIT_FAILURE); - } + /* We expect launch to fail, so ignore the return value. */ + ignore_value (guestfs_launch (g)); guestfs_close (g);