diff options
-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: |