ash: re-enable SIGHUP on entry. Closes bug 771.
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Dec 2009 03:18:31 +0000 (04:18 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Dec 2009 03:18:31 +0000 (04:18 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c

index cf406a42e01651f5b1d3cdc1f60e0eb82687b549..5d0fc6d292e0929c95f8972a25d3433f07a5a505 100644 (file)
@@ -13016,6 +13016,10 @@ init(void)
 
        /* from trap.c: */
        signal(SIGCHLD, SIG_DFL);
+       /* bash re-enables SIGHUP which is SIG_IGNed on entry.
+        * Try: "trap '' HUP; bash; echo RET" and type "kill -HUP $$"
+        */
+        signal(SIGHUP, SIG_DFL);
 
        /* from var.c: */
        {