diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | process.c | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sat Nov 6 07:03:49 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * process.c (rb_fork_err): save errinfo before fdopen. + Sat Nov 6 00:43:58 2010 Aaron Patterson <aaron@tenderlovemaking.com> * ext/openssl/ossl_ocsp.c (ossl_ocspcid_initialize): an optional @@ -2569,8 +2569,9 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU if (!(int)rb_protect(chfunc_protect, (VALUE)&arg, &state)) _exit(EXIT_SUCCESS); #ifdef FD_CLOEXEC if (write(ep[1], &state, sizeof(state)) == sizeof(state) && state) { + VALUE errinfo = rb_errinfo(); io = rb_io_fdopen(ep[1], O_WRONLY|O_BINARY, NULL); - rb_marshal_dump(rb_errinfo(), io); + rb_marshal_dump(errinfo, io); rb_io_flush(io); } err = errno; |