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): check failures of waitpid.

[ruby-talk:398687]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-08-29 13:02:45 +00:00
parent 22c81db9d8
commit 7c854d6d5e
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Aug 29 22:01:15 2012 Tanaka Akira <akr@fsij.org>
* process.c (rb_f_system): check failures of waitpid.
[ruby-talk:398687]
Wed Aug 29 15:03:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (LIBDIR_BASENAME): use configured libdir value to fix

View file

@ -3661,7 +3661,10 @@ rb_f_system(int argc, VALUE *argv)
pid = rb_spawn_internal(argc, argv, NULL, 0);
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
if (pid > 0) {
rb_syswait(pid);
int ret, status;
ret = rb_waitpid(pid, &status, 0);
if (ret == (rb_pid_t)-1)
rb_sys_fail("Another thread waited the process started by system().");
}
#endif
#ifdef SIGCHLD