diff --git a/ChangeLog b/ChangeLog index e2b28502d8..a4bd327c35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Dec 25 20:01:40 2010 KOSAKI Motohiro + + * io.c (pipe_open): Added rb_thread_atfork(). We must reinitialize + GVL at new process creation. + Sat Dec 25 18:26:55 2010 Tanaka Akira * ext/socket/option.c (inspect_ipv6_mreq): new function to inspect diff --git a/io.c b/io.c index 5e38ce7db2..943d124988 100644 --- a/io.c +++ b/io.c @@ -5072,6 +5072,7 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode, fflush(stdin); /* is it really needed? */ pid = rb_fork(&status, 0, 0, Qnil); if (pid == 0) { /* child */ + rb_thread_atfork(); popen_redirect(&arg); rb_io_synchronized(RFILE(orig_stdout)->fptr); rb_io_synchronized(RFILE(orig_stderr)->fptr);