1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c (rb_f_system): shouldn't block SIGCHLD if it's not

exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2006-07-18 14:55:28 +00:00
parent 6b87ac68db
commit 553bba0b47
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Jul 18 23:53:59 2006 NAKAMURA Usaku <usa@ruby-lang.org>
* process.c (rb_f_system): shouldn't block SIGCHLD if it's not
exist.
Tue Jul 18 22:10:13 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* process.c (rb_f_system): block SIGCHLD during the process

View file

@ -1591,16 +1591,20 @@ static VALUE
rb_f_system(int argc, VALUE *argv)
{
int status;
#ifdef SIGCHLD
RETSIGTYPE (*chfunc)(int);
chfunc = signal(SIGCHLD, SIG_DFL);
#endif
status = rb_spawn(argc, argv);
if (status > 0) {
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
rb_syswait(status);
#endif
}
#ifdef SIGCHLD
signal(SIGCHLD, chfunc);
#endif
if (status < 0) {
rb_sys_fail(RSTRING(argv[0])->ptr);
}