* 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:
parent
22c81db9d8
commit
7c854d6d5e
@ -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>
|
Wed Aug 29 15:03:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in (LIBDIR_BASENAME): use configured libdir value to fix
|
* configure.in (LIBDIR_BASENAME): use configured libdir value to fix
|
||||||
|
@ -3661,7 +3661,10 @@ rb_f_system(int argc, VALUE *argv)
|
|||||||
pid = rb_spawn_internal(argc, argv, NULL, 0);
|
pid = rb_spawn_internal(argc, argv, NULL, 0);
|
||||||
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
|
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
|
||||||
if (pid > 0) {
|
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
|
#endif
|
||||||
#ifdef SIGCHLD
|
#ifdef SIGCHLD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user