rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone

Blame SOURCES/bash-4.3-trapped-signals.patch

07a490
diff --git a/jobs.c b/jobs.c
07a490
index 37edece..31395fe 100644
07a490
--- a/jobs.c
07a490
+++ b/jobs.c
07a490
@@ -2244,10 +2244,14 @@ wait_sigint_handler (sig)
07a490
 	  signal_is_trapped (SIGINT) &&
07a490
 	  ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler))
07a490
 	{
07a490
-	  interrupt_immediately = 0;
07a490
 	  trap_handler (SIGINT);	/* set pending_traps[SIGINT] */
07a490
 	  wait_signal_received = SIGINT;
07a490
-	  longjmp (wait_intr_buf, 1);
07a490
+	  if (interrupt_immediately)
07a490
+	    {
07a490
+	      interrupt_immediately = 0;
07a490
+	      longjmp (wait_intr_buf, 1);
07a490
+	    }
07a490
+	  SIGRETURN (0);
07a490
 	}
07a490
       
07a490
       ADDINTERRUPT;
07a490
-- 
07a490
2.5.5
07a490