ruby-changes:42817
From: normal <ko1@a...>
Date: Tue, 3 May 2016 05:07:43 +0900 (JST)
Subject: [ruby-changes:42817] normal:r54890 (trunk): process.c (disable_child_handler_fork_child): initialize handler for SIGPIPE
normal 2016-05-03 06:04:17 +0900 (Tue, 03 May 2016) New Revision: 54890 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54890 Log: process.c (disable_child_handler_fork_child): initialize handler for SIGPIPE This only happens on the !POSIX_SIGNAL case; but one may test with the following: --- a/process.c +++ b/process.c @@ -3479,6 +3479,7 @@ disable_child_handler_fork_parent(struct child_handler_disabler_state *old) #endif } +#undef POSIX_SIGNAL /* This function should be async-signal-safe. Actually it is. */ static int disable_child_handler_fork_child(struct child_handler_disabler_state *old, char *errmsg, size_t errmsg_buflen) Modified files: trunk/ChangeLog trunk/process.c Index: process.c =================================================================== --- process.c (revision 54889) +++ process.c (revision 54890) @@ -3502,8 +3502,12 @@ disable_child_handler_fork_child(struct https://github.com/ruby/ruby/blob/trunk/process.c#L3502 for (sig = 1; sig < NSIG; sig++) { int reset = 0; #ifdef SIGPIPE - if (sig == SIGPIPE) + if (sig == SIGPIPE) { reset = 1; +#ifndef POSIX_SIGNAL + handler = SIG_DFL; +#endif + } #endif if (!reset) { #ifdef POSIX_SIGNAL Index: ChangeLog =================================================================== --- ChangeLog (revision 54889) +++ ChangeLog (revision 54890) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue May 3 05:35:54 2016 Eric Wong <e@8...> + + * process.c (disable_child_handler_fork_child): + initialize handler for SIGPIPE for !POSIX_SIGNAL + Mon May 2 23:03:42 2016 NAKAMURA Usaku <usa@r...> * win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements new -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/