aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/awk.h b/awk.h
index 43d2713c..934fe25b 100644
--- a/awk.h
+++ b/awk.h
@@ -1968,7 +1968,9 @@ erealloc_real(void *ptr, size_t count, const char *where, const char *var, const
#ifdef SIGPIPE
#define ignore_sigpipe() signal(SIGPIPE, SIG_IGN)
#define set_sigpipe_to_default() signal(SIGPIPE, SIG_DFL)
+#define die_via_sigpipe() (signal(SIGPIPE, SIG_DFL), kill(getpid(), SIGPIPE))
#else
#define ignore_sigpipe()
#define set_sigpipe_to_default()
+#define die_via_sigpipe() exit(EXIT_FATAL)
#endif