rcolebaugh / rpms / bash

Forked from rpms/bash 2 years ago
Clone

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

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