* 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
This commit is contained in:
akr 2012-06-08 13:43:48 +00:00
Родитель c17c8ebb14
Коммит 373a7d1a95
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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: