mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (before_exec): use sig_do_nothing instead of SIG_DFL
for avoiding a race. * process.c (sig_do_nothing): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2552e428f3
commit
1d110a14a4
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Jun 20 22:52:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* process.c (before_exec): use sig_do_nothing instead of SIG_DFL
|
||||
for avoiding a race.
|
||||
* process.c (sig_do_nothing): new function.
|
||||
|
||||
Mon Jun 20 21:31:03 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread_pthread.c (thread_timer): rename timeout_10ms to
|
||||
|
|
|
@ -984,6 +984,12 @@ static RETSIGTYPE (*saved_sigpipe_handler)(int) = 0;
|
|||
# define signal(a,b) posix_signal((a),(b))
|
||||
#endif
|
||||
|
||||
#ifdef SIGPIPE
|
||||
static RETSIGTYPE sig_do_nothing(int sig)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static void before_exec(void)
|
||||
{
|
||||
/*
|
||||
|
@ -999,7 +1005,7 @@ static void before_exec(void)
|
|||
* child process interaction might fail. (e.g. ruby -e "system 'yes | ls'")
|
||||
* [ruby-dev:12261]
|
||||
*/
|
||||
saved_sigpipe_handler = signal(SIGPIPE, SIG_DFL);
|
||||
saved_sigpipe_handler = signal(SIGPIPE, sig_do_nothing);
|
||||
#endif
|
||||
|
||||
if (!forked_child) {
|
||||
|
|
Loading…
Reference in a new issue