summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-10 02:45:38 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-10 02:45:38 +0000
commit258716bd9d5398b7e6a6375ef5dd4f23790c6af5 (patch)
tree29f564d8adc7a1ef6a57d27492a25d357476e9c5 /process.c
parent3ffd8a918ff2cfd555bf7e89329b275d1fe8ab12 (diff)
* process.c (rb_fork_internal): call after_fork only unless
chfunc_is_async_signal_safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process.c b/process.c
index b88ed846b7..619f6a9f04 100644
--- a/process.c
+++ b/process.c
@@ -2945,7 +2945,8 @@ rb_fork_internal(int *status, int (*chfunc)(void*, char *, size_t), void *charg,
_exit(127);
#endif
}
- after_fork();
+ if (!chfunc_is_async_signal_safe)
+ after_fork();
close(ep[1]);
error_occured = recv_child_error(ep[0], &state, &exc, &err, errmsg, errmsg_buflen, chfunc_is_async_signal_safe);
if (state || error_occured) {