X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=fish%2Ffish.c;h=b962c3c924b829e752ab1eec51d201f1fa2c37b3;hb=1bbd84b1ff8ed2a74522887499c8f2b5154eb363;hp=a6db0857db3f2d9f384bce506f623b11aff00638;hpb=ac42042573cc3ee8818926dcbfaa2dc9ff2cb585;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index a6db085..b962c3c 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -405,6 +405,17 @@ main (int argc, char *argv[]) /* If we've got mountpoints, we must launch the guest and mount them. */ if (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 (g) == -1) exit (EXIT_FAILURE); mount_mps (mps); }