diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | process.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -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 @@ -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); } |