summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-26 05:37:59 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-26 05:37:59 (GMT)
commit46b39cb0ba0510c129483ce74f187ce96e6d4774 (patch)
treec9b63d3c3134b7cc632a75cf067aeda9f940a5a1 /signal.c
parent38e62df9f6f6b759fef4c8ccaec352654d1070dc (diff)
revert r31760 and r31761
seems that rb_bug_errno() is called in sigpipe() intentionally. https://gist.github.com/sorah/831169 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/signal.c b/signal.c
index 34d229a..9b3153d 100644
--- a/signal.c
+++ b/signal.c
@@ -935,7 +935,7 @@ check_reserved_signal_(const char *name, size_t name_len)
}
#endif
-#ifdef SIGSYS
+#if defined SIGPIPE || defined SIGSYS
static RETSIGTYPE
sig_do_nothing(int sig)
{
@@ -1066,7 +1066,7 @@ default_handler(int sig)
#endif
#ifdef SIGPIPE
case SIGPIPE:
- func = SIG_IGN;
+ func = sig_do_nothing;
break;
#endif
#ifdef SIGSYS
@@ -1487,7 +1487,7 @@ Init_signal(void)
#endif
}
#ifdef SIGPIPE
- install_sighandler(SIGPIPE, SIG_IGN);
+ install_sighandler(SIGPIPE, sig_do_nothing);
#endif
#ifdef SIGSYS
install_sighandler(SIGSYS, sig_do_nothing);