in reply to Re^3: Ulimit makes program hang (bug?)
in thread Ulimit makes program hang
As you can see, if the fork fails with an EAGAIN, perl sleeps for 5 seconds and tries again.while ((pid = PerlProc_fork()) < 0) { if (errno != EAGAIN) { PerlLIO_close(p[This]); PerlLIO_close(p[that]); if (did_pipes) { PerlLIO_close(pp[0]); PerlLIO_close(pp[1]); } if (!doexec) Perl_croak(aTHX_ "Can't fork"); return NULL; } sleep(5); }
A similar loop is found in Perl_my_popen_list in the same file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Ulimit makes program hang (bug?)
by memo2005 (Initiate) on Aug 14, 2008 at 08:19 UTC |