diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-26 05:37:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-26 05:37:59 +0000 |
commit | e04b75994c6f85c9eecf1c25dc28ca06ca311835 (patch) | |
tree | c9b63d3c3134b7cc632a75cf067aeda9f940a5a1 /process.c | |
parent | cb549df7fd4f2bcd1f0f4703084d41a8a7fd60a0 (diff) | |
download | ruby-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.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -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 |