Annotation of /trunk/bash/patches/bash-3.0-trap-fg-signals.patch
Parent Directory | Revision Log
Revision 144 -
(hide annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 641 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 641 byte(s)
-import
1 | niro | 144 | Don't barf on handled signals inside of scripts. Makes for nicer output. |
2 | |||
3 | patch by Martin Schlemmer <azarah@gentoo.org> | ||
4 | |||
5 | --- jobs.c | ||
6 | +++ jobs.c | ||
7 | @@ -2893,11 +2893,11 @@ | ||
8 | } | ||
9 | else if (IS_FOREGROUND (job)) | ||
10 | { | ||
11 | -#if !defined (DONT_REPORT_SIGPIPE) | ||
12 | - if (termsig && WIFSIGNALED (s) && termsig != SIGINT) | ||
13 | -#else | ||
14 | - if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE) | ||
15 | -#endif | ||
16 | + if (termsig && WIFSIGNALED (s) && termsig != SIGINT && | ||
17 | +#if defined (DONT_REPORT_SIGPIPE) | ||
18 | + termsig != SIGPIPE && | ||
19 | +#endif | ||
20 | + signal_is_trapped (termsig) == 0) | ||
21 | { | ||
22 | fprintf (stderr, "%s", j_strsignal (termsig)); | ||
23 |