ruby-changes:23939
From: akr <ko1@a...>
Date: Sat, 9 Jun 2012 23:58:12 +0900 (JST)
Subject: [ruby-changes:23939] akr:r35990 (trunk): * process.c (rb_fork_err): rewrite a complex "if" statement.
akr 2012-06-09 23:58:03 +0900 (Sat, 09 Jun 2012) New Revision: 35990 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35990 Log: * process.c (rb_fork_err): rewrite a complex "if" statement. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35989) +++ ChangeLog (revision 35990) @@ -1,3 +1,7 @@ +Sat Jun 9 23:57:03 2012 Tanaka Akira <akr@f...> + + * process.c (rb_fork_err): rewrite a complex "if" statement. + Sat Jun 9 23:44:29 2012 Tanaka Akira <akr@f...> * process.c (before_exec_async_signal_safe): extracted from Index: process.c =================================================================== --- process.c (revision 35989) +++ process.c (revision 35990) @@ -2900,13 +2900,15 @@ return pid; if (!pid) { struct chfunc_protect_t arg; + int ret; forked_child = 1; close(ep[0]); arg.chfunc = chfunc; arg.arg = charg; arg.errmsg = errmsg; arg.buflen = errmsg_buflen; - if (!(int)rb_protect(chfunc_protect, (VALUE)&arg, &state)) _exit(EXIT_SUCCESS); + ret = (int)rb_protect(chfunc_protect, (VALUE)&arg, &state); + if (!ret) _exit(EXIT_SUCCESS); send_child_error(ep[1], state, errmsg, errmsg_buflen); #if EXIT_SUCCESS == 127 _exit(EXIT_FAILURE); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/