summaryrefslogtreecommitdiff
path: root/mksignal.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2016-07-11 22:05:18 +0200
committerBert Münnich <ber.t@posteo.de>2019-03-24 15:01:23 +0100
commit592d9f333cde3f5263453c34d58c82708a91224c (patch)
treea5f15f7ea812fa370d6e3484a6ef49c88b2e49ce /mksignal.c
parent1263ab60d5bf5612d273b80e87a430b9e0a75afd (diff)
Revise status messages for terminated children
Print a status message for a terminated child if: 1) the wait builtin is called in an interactive shell, or 2) the child terminated due to a signal and it is not sigint and not sigpipe or it caused the child to dump core. The messages are of the form: [pid:] <signal message[--core dumped] | done (status)> Before this, there were various inconsistencies, e.g. the wait builtin-- regardless if called in an interactive shell or script--would print just the pid and a colon w/o a message and w/o a newline if the child it waited for terminated due to receiving sigint.
Diffstat (limited to 'mksignal.c')
-rw-r--r--mksignal.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mksignal.c b/mksignal.c
index 727d0e2..12c6341 100644
--- a/mksignal.c
+++ b/mksignal.c
@@ -57,12 +57,9 @@ static struct signaming signamings[] = {
#ifdef SIGILL
{ SIGILL, "sigill", "illegal instruction"},
#endif
-
-/* We don't want a default message for SIGINT. */
#ifdef SIGINT
- { SIGINT, "sigint", ""},
+ { SIGINT, "sigint", "interrupt"},
#endif
-
#ifdef SIGIO
{ SIGIO, "sigio", "socket i/o possible"},
#endif
@@ -78,12 +75,9 @@ static struct signaming signamings[] = {
#ifdef SIGLWP
{ SIGLWP, "siglwp", "thread library signal"},
#endif
-
-/* By default, SIGPIPEs are silent. */
#ifdef SIGPIPE
- { SIGPIPE, "sigpipe", ""},
+ { SIGPIPE, "sigpipe", "broken pipe"},
#endif
-
#ifdef SIGPOLL
{ SIGPOLL, "sigpoll", "pollable event occurred"},
#endif