diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-08 13:50:38 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-08 13:50:38 +0000 |
commit | ba1c1786d625a9477f029e153a5f10a7e9476319 (patch) | |
tree | 2c460e496f23e826e9bbdc6e9d352d69c8fef6a6 /process.c | |
parent | 373a7d1a9552428d65b7f81527c77a5837410746 (diff) | |
download | ruby-ba1c1786d625a9477f029e153a5f10a7e9476319.tar.gz |
add comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2788,10 +2788,16 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU continue; } else { + /* rb_protect() is required not only for non-NULL status + * but also for non-NULL chfunc because + * ep[0] and ep[1] should be closed on exceptions. + * If status is NULL, the catched exception is re-raised + * by rb_jump_tag() below, after closing them. */ rb_protect((VALUE (*)())rb_thread_sleep, 1, &state); if (status) *status = state; if (!state) continue; } + /* fall through */ default: #ifdef FD_CLOEXEC if (chfunc) { |