aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--process.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d81d994df0..5e44795f10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jun 7 22:13:05 2012 Tanaka Akira <akr@fsij.org>
+
+ * process.c (rb_fork_err): Fix the conditoin to use rb_protect.
+
Thu Jun 7 20:29:12 2012 Tanaka Akira <akr@fsij.org>
* include/ruby/intern.h: rb_exec_arg and related stuff moved back from
diff --git a/process.c b/process.c
index 752c174b65..3b4f3a6008 100644
--- a/process.c
+++ b/process.c
@@ -2787,13 +2787,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 && !chfunc) {
+ if (!status) {
rb_thread_sleep(1);
continue;
}
else {
rb_protect((VALUE (*)())rb_thread_sleep, 1, &state);
- if (status) *status = state;
+ *status = state;
if (!state) continue;
}
default: