aboutsummaryrefslogtreecommitdiffstats
path: root/signal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-26 05:37:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-26 05:37:59 +0000
commite04b75994c6f85c9eecf1c25dc28ca06ca311835 (patch)
treec9b63d3c3134b7cc632a75cf067aeda9f940a5a1 /signal.c
parentcb549df7fd4f2bcd1f0f4703084d41a8a7fd60a0 (diff)
downloadruby-e04b75994c6f85c9eecf1c25dc28ca06ca311835.tar.gz
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 34d229a71d..9b3153d99d 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);