diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-09 13:28:02 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-09 13:28:02 +0000 |
commit | 7057facef3376f5522783d70a2fa7d5396fabe1a (patch) | |
tree | b03e817a66cb084c8eaff0ac665093a4e92e2e57 /process.c | |
parent | 1ad3f4b05d75383fa0cfc1e03c2abacc660812c0 (diff) | |
download | ruby-7057facef3376f5522783d70a2fa7d5396fabe1a.tar.gz |
* process.c (retry_fork): rewrite a complex "for" statement by
simple statements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2766,9 +2766,13 @@ retry_fork(int *status, int *ep) 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 |