fish: fix the Ctrl-\ causes guestfish to abort bug(RHBZ#596761)
authorWanlong Gao <gaowanlong@cn.fujitsu.com>
Wed, 28 Dec 2011 09:59:38 +0000 (17:59 +0800)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 4 Jan 2012 10:04:15 +0000 (10:04 +0000)
Handle SIGQUIT by guestfish, so that it can't be terminated.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
fish/fish.c

index efd6b0b..b782b7c 100644 (file)
@@ -402,6 +402,7 @@ main (int argc, char *argv[])
     sa.sa_handler = user_cancel;
     sa.sa_flags = SA_RESTART;
     sigaction (SIGINT, &sa, NULL);
     sa.sa_handler = user_cancel;
     sa.sa_flags = SA_RESTART;
     sigaction (SIGINT, &sa, NULL);
+    sigaction (SIGQUIT, &sa, NULL);
 
     guestfs_set_pgroup (g, 1);
   }
 
     guestfs_set_pgroup (g, 1);
   }