diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | signal.c | 12 |
2 files changed, 8 insertions, 10 deletions
@@ -1,3 +1,9 @@ +Sat May 28 16:08:16 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * signal.c (Init_signal, default_handler): change default SIGPIPE handler + from empty function to SIG_IGN. [ruby-dev:43215] + * signal.c (sigpipe): removed. + Sat May 28 03:04:27 2011 NARUSE, Yui <naruse@ruby-lang.org> * io.c (fill_cbuf): return MORE_CHAR_SUSPENDED when cbuf is not empty. @@ -623,14 +623,6 @@ sigsegv(int sig SIGINFO_ARG) } #endif -#ifdef SIGPIPE -static RETSIGTYPE -sigpipe(int sig) -{ - /* do nothing */ -} -#endif - static void signal_exec(VALUE cmd, int safe, int sig) { @@ -746,7 +738,7 @@ default_handler(int sig) #endif #ifdef SIGPIPE case SIGPIPE: - func = sigpipe; + func = SIG_IGN; break; #endif default: @@ -1143,7 +1135,7 @@ Init_signal(void) #endif } #ifdef SIGPIPE - install_sighandler(SIGPIPE, sigpipe); + install_sighandler(SIGPIPE, SIG_IGN); #endif #if defined(SIGCLD) |