ruby-changes:23935
From: akr <ko1@a...>
Date: Sat, 9 Jun 2012 22:28:15 +0900 (JST)
Subject: [ruby-changes:23935] akr:r35986 (trunk): * process.c (retry_fork): rewrite a complex "for" statement by
akr 2012-06-09 22:28:02 +0900 (Sat, 09 Jun 2012) New Revision: 35986 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35986 Log: * process.c (retry_fork): rewrite a complex "for" statement by simple statements. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35985) +++ ChangeLog (revision 35986) @@ -1,3 +1,8 @@ +Sat Jun 9 22:27:05 2012 Tanaka Akira <akr@f...> + + * process.c (retry_fork): rewrite a complex "for" statement by + simple statements. + Sat Jun 9 21:50:04 2012 Tanaka Akira <akr@f...> * process.c (retry_fork): extracted from rb_fork_err. Index: process.c =================================================================== --- process.c (revision 35985) +++ process.c (revision 35986) @@ -2766,9 +2766,13 @@ rb_io_flush(rb_stderr) \ ) - prefork(); - for (; before_fork(), (pid = fork()) < 0; prefork()) { - after_fork(); + while (1) { + prefork(); + before_fork(); + pid = fork(); + if (0 <= pid) + break; + after_fork(); switch (errno) { case EAGAIN: #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/