summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-28 07:11:54 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-28 07:11:54 +0000
commite39b50d4b5531b84386862b47c3d3d273e6c32c7 (patch)
tree5fb05fafa6cd482bd15d9a8927b27db8b6a37f49 /signal.c
parentaede5b391193a2493594e4fcd49ffd685fbe41ca (diff)
* signal.c (Init_signal, default_handler): change default SIGPIPE handler
from empty function to SIG_IGN. [ruby-dev:43215] * signal.c (sigpipe): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/signal.c b/signal.c
index c7ad67fc81..42a2fb3533 100644
--- a/signal.c
+++ b/signal.c
@@ -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)