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 /process.c | |
parent | c17c8ebb1467cc78028cf2794f666d7493f46caf (diff) |
* 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
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |