summaryrefslogtreecommitdiff
path: root/process.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
commit46b39cb0ba0510c129483ce74f187ce96e6d4774 (patch)
treec9b63d3c3134b7cc632a75cf067aeda9f940a5a1 /process.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 'process.c')
-rw-r--r--process.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/process.c b/process.c
index 5643c09..cdc9692 100644
--- a/process.c
+++ b/process.c
@@ -1136,30 +1136,10 @@ proc_detach(VALUE obj, VALUE pid)
return rb_detach_process(NUM2PIDT(pid));
}
-#ifdef SIGPIPE
-static RETSIGTYPE (*saved_sigpipe_handler)(int) = 0;
-#endif
-
-#ifdef SIGPIPE
-static RETSIGTYPE
-sig_do_nothing(int sig)
-{
-}
-#endif
-
/* This function should be async-signal-safe. Actually it is. */
static void
before_exec_async_signal_safe(void)
{
-#ifdef SIGPIPE
- /*
- * Some OS commands don't initialize signal handler properly. Thus we have
- * to reset signal handler before exec(). Otherwise, system() and similar
- * child process interaction might fail. (e.g. ruby -e "system 'yes | ls'")
- * [ruby-dev:12261]
- */
- saved_sigpipe_handler = signal(SIGPIPE, sig_do_nothing); /* async-signal-safe */
-#endif
}
static void
@@ -1186,9 +1166,6 @@ before_exec(void)
static void
after_exec_async_signal_safe(void)
{
-#ifdef SIGPIPE
- signal(SIGPIPE, saved_sigpipe_handler); /* async-signal-safe */
-#endif
}
static void