-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-105912: document gotcha with using os.fork on macOS #112871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem.
I'm not entirely happy about using "unsafe" as the description, but I'm not sure about a better alternative that doesn't use a lot more text. This also replicates part of the text in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you @ronaldoussoren about not being completely happy with "unsafe". I can't think of a way of succinctly stating this without talking about parent and child processes on macOS.
Going to merge since this at least flags the gotcha.
Thanks @ronaldoussoren for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…H-112871) * pythongh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. (cherry picked from commit 22511f7) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
GH-113133 is a backport of this pull request to the 3.12 branch. |
Sorry, @ronaldoussoren, I could not cleanly backport this to
|
GH-113135 is a backport of this pull request to the 3.11 branch. |
…112871) * pythongh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
) (#113133) gh-105912: document gotcha with using os.fork on macOS (GH-112871) * gh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. (cherry picked from commit 22511f7) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
) (#113135) * gh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. (cherry picked from commit 22511f7) Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
…112871) * pythongh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
…112871) * pythongh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Using
fork(2)
on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern.There's nothing we can do about this other than documenting the problem.
📚 Documentation preview 📚: https://cpython-previews--112871.org.readthedocs.build/