rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone

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

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