* [PATCH] process.c (disable_child_handler_fork_child): initialize handler for SIGPIPE
@ 2016-05-02 9:39 e
0 siblings, 0 replies; only message in thread
From: e @ 2016-05-02 9:39 UTC (permalink / raw)
To: spew
From: Eric Wong <e@80x24.org>
This only happens on the !POSIX_SIGNAL case; but one may
test with the following:
diff --git a/process.c b/process.c
index bae459a..2e97e4b 100644
--- a/process.c
+++ b/process.c
@@ -3479,6 +3479,7 @@ disable_child_handler_fork_parent(struct child_handler_disabler_state *old)
#endif
}
+#undef POSIX_SIGNAL
/* This function should be async-signal-safe. Actually it is. */
static int
disable_child_handler_fork_child(struct child_handler_disabler_state *old, char *errmsg, size_t errmsg_buflen)
---
process.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/process.c b/process.c
index 660c2c7..bae459a 100644
--- a/process.c
+++ b/process.c
@@ -3502,8 +3502,12 @@ disable_child_handler_fork_child(struct child_handler_disabler_state *old, char
for (sig = 1; sig < NSIG; sig++) {
int reset = 0;
#ifdef SIGPIPE
- if (sig == SIGPIPE)
+ if (sig == SIGPIPE) {
reset = 1;
+#ifndef POSIX_SIGNAL
+ handler = SIG_DFL;
+#endif
+ }
#endif
if (!reset) {
#ifdef POSIX_SIGNAL
--
2.8.0.rc2.38.gfdf5e7f
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-02 9:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-02 9:39 [PATCH] process.c (disable_child_handler_fork_child): initialize handler for SIGPIPE e
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).