aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--process.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b0c824bb68..e806bd9479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Fri Jun 8 11:26:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * process.c (rb_fork_err): error state in the child process is prior
+ to exceptions in proc_syswait().
* process.c (rb_fork_err): determine status on errors.
diff --git a/process.c b/process.c
index ebf231f69e..13c121f070 100644
--- a/process.c
+++ b/process.c
@@ -2874,8 +2874,8 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU
rb_io_close(io);
if (state || size) {
if (status) {
- *status = state;
rb_protect(proc_syswait, (VALUE)pid, status);
+ if (state) *status = state;
}
else {
rb_syswait(pid);