aboutsummaryrefslogtreecommitdiffstats
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
commite04b75994c6f85c9eecf1c25dc28ca06ca311835 (patch)
treec9b63d3c3134b7cc632a75cf067aeda9f940a5a1 /process.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 'process.c')
-rw-r--r--process.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/process.c b/process.c
index 5643c09d6d..cdc9692988 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