зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
1ad3f4b05d
Коммит
7057facef3
|
@ -1,3 +1,8 @@
|
|||
Sat Jun 9 22:27:05 2012 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (retry_fork): rewrite a complex "for" statement by
|
||||
simple statements.
|
||||
|
||||
Sat Jun 9 21:50:04 2012 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (retry_fork): extracted from rb_fork_err.
|
||||
|
|
10
process.c
10
process.c
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче