blob: c7010511853f06f690a810d9345292d19a5e8d26 (
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>
--- a/jobs.c
+++ b/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));
|