diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-08 13:43:48 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-08 13:43:48 +0000 |
commit | 373a7d1a9552428d65b7f81527c77a5837410746 (patch) | |
tree | 5e296d277b93f2ab5cca2fc0933aabfe1998a590 | |
parent | c17c8ebb1467cc78028cf2794f666d7493f46caf (diff) | |
download | ruby-373a7d1a9552428d65b7f81527c77a5837410746.tar.gz |
* process.c (rb_fork_err): revert r35955. The condition needs !chfunc
to close ep[0] and ep[1]. The catched exception is re-raised
immediately after that if status is not NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | process.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Fri Jun 8 22:39:32 2012 Tanaka Akira <akr@fsij.org> + + * process.c (rb_fork_err): revert r35955. The condition needs !chfunc + to close ep[0] and ep[1]. The catched exception is re-raised + immediately after that if status is not NULL. + Fri Jun 8 19:43:33 2012 Tanaka Akira <akr@fsij.org> * process.c (rb_exec_err): after_exec() call moved from proc_exec_cmd and @@ -2783,13 +2783,13 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN case EWOULDBLOCK: #endif - if (!status) { + if (!status && !chfunc) { rb_thread_sleep(1); continue; } else { rb_protect((VALUE (*)())rb_thread_sleep, 1, &state); - *status = state; + if (status) *status = state; if (!state) continue; } default: |