You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-shells/bash/files/bash-3.0-trap-fg-signals.patch

24 lines
641 B

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));