Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 175216 Details for
Bug 250843
<=app-shell/bash-3.2_p48 and <=dev-lang/python-2.6-r5 don't handle EAGAIN returned by fork() properly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix fork() failing on EAGAIN in Python
python-2.5.2-EAGAIN.patch (text/plain), 539 bytes, created by
Alex Volkov
on 2008-12-13 16:34:10 UTC
(
hide
)
Description:
fix fork() failing on EAGAIN in Python
Filename:
MIME Type:
Creator:
Alex Volkov
Created:
2008-12-13 16:34:10 UTC
Size:
539 bytes
patch
obsolete
>--- Modules/posixmodule.c.ori Sat Jun 7 04:10:54 2008 >+++ Modules/posixmodule.c Sat Jun 7 05:05:29 2008 >@@ -3467,7 +3467,13 @@ > static PyObject * > posix_fork(PyObject *self, PyObject *noargs) > { >- int pid = fork(); >+ unsigned int forksleep = 1; >+ int pid; >+ while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < 32) >+ { >+ if (sleep (forksleep)) break; /* break on signals, e.g. ^C */ >+ forksleep <<= 1; >+ } > if (pid == -1) > return posix_error(); > if (pid == 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250843
:
175215
|
175216
|
175328