summaryrefslogtreecommitdiff
blob: cde18326ed2db5723670d2820244dc05f40ff2d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Don't barf on handled signals inside of scripts.  Makes for nicer output.

patch by Martin Schlemmer <azarah@gentoo.org>

--- jobs.c
+++ jobs.c
@@ -2893,11 +2893,11 @@
 		}
 	      else if (IS_FOREGROUND (job))
 		{
-#if !defined (DONT_REPORT_SIGPIPE)
-		  if (termsig && WIFSIGNALED (s) && termsig != SIGINT)
-#else
-		  if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE)
-#endif
+		  if (termsig && WIFSIGNALED (s) && termsig != SIGINT &&
+#if defined (DONT_REPORT_SIGPIPE)
+		  termsig != SIGPIPE &&
+#endif
+		  signal_is_trapped (termsig) == 0)
 		    {
 		      fprintf (stderr, "%s", j_strsignal (termsig));