diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-10-17 18:14:05 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-10-17 18:14:05 +0000 |
commit | 1b2d3f81ee00c3fc5f002aaf7a646ed08e605610 (patch) | |
tree | e0a3a8afd1fbda407b8e36749d4f84f7e1942c0a /process.c | |
parent | d51bcd20071f6f61bce0364c81fb48e2c5b7d224 (diff) | |
download | ruby-1b2d3f81ee00c3fc5f002aaf7a646ed08e605610.tar.gz |
1.6.2 (to be)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -86,11 +86,13 @@ rb_waitpid(pid, flags, st) } retry: + TRAP_BEG; #ifdef HAVE_WAITPID result = waitpid(pid, st, flags); #else /* HAVE_WAIT4 */ result = wait4(pid, st, flags, NULL); #endif + TRAP_END; if (result < 0) { if (errno == EINTR) { rb_thread_polling(); @@ -116,7 +118,9 @@ rb_waitpid(pid, flags, st) } for (;;) { + TRAP_BEG; result = wait(st); + TRAP_END; if (result < 0) { if (errno == EINTR) { rb_thread_schedule(); @@ -170,7 +174,11 @@ proc_wait() return INT2FIX(data.pid); } - while ((pid = wait(&state)) < 0) { + while (1) { + TRAP_BEG; + pid = wait(&state); + TRA_END; + if (pid >= 0) break; if (errno == EINTR) { rb_thread_schedule(); continue; @@ -218,7 +226,7 @@ proc_waitpid2(argc, argv) int argc; VALUE *argv; { - VALUE pid = proc_waitpid2(argc, argv); + VALUE pid = proc_waitpid(argc, argv); return rb_assoc_new(pid, rb_last_status); } |