X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Ffish.c;h=4276ae19b1778d9e302d441875e0909ec7681b5e;hp=470c625105d7b6281f8df4017c3d0082cb7b22de;hb=8161ea9bb046c8450384b5b15e1f4b2f3dca582b;hpb=cf9e01508d48b752a29df4fceb95ed5306651fe2 diff --git a/fish/fish.c b/fish/fish.c index 470c625..4276ae1 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -476,6 +476,17 @@ main (int argc, char *argv[]) * guest and mount them. */ if (next_prepared_drive > 1 || mps != NULL) { + /* RHBZ#612178: If --listen flag is given, then we will fork into + * the background in rc_listen(). However you can't do this while + * holding a libguestfs handle open because the recovery process + * will think the main program has died and kill qemu. Therefore + * don't use the recovery process for this case. (A better + * solution would be to call launch () etc after the fork, but + * that greatly complicates the code here). + */ + if (remote_control_listen) + guestfs_set_recovery_proc (g, 0); + if (launch () == -1) exit (EXIT_FAILURE); prepare_drives (drvs); mount_mps (mps);