-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
gh-100228: Warn from os.fork() if other threads exist. #100229
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b5a53af
Warn from os.fork() if other threads exist.
gpshead f4a1dda
fix existing tests for the new warning.
gpshead bca33f9
static
gpshead d0eb2f6
&_Py_ID() for _active and _limbo.
gpshead fb098f1
news wording tweak
gpshead 67e2b75
Add platform API calls on Linux & Mac, polish up.
gpshead e418723
Merge branch 'warn/os.fork/threads' of github.com:gpshead/cpython int…
gpshead 2031888
Probably fix the macOS crashes.
gpshead 546fac1
Fix test_os race condition.
gpshead a2e753e
remove the already_warned logic.
gpshead 5655d59
Improve the warning message.
gpshead 7c9205e
Update Misc/NEWS.d/next/Library/2022-12-13-17-29-09.gh-issue-100228.b…
gpshead 2854473
Update a comment
gpshead 1d3ec86
Clean up comments; add a final PyErr_Clear warning
gpshead 0d95679
Improve test_os robustness.
gpshead f6a7b6e
ignore expected warnings.
gpshead 0ca9fc7
improve error message.
gpshead a91a4d1
silence the warning in more tests.
gpshead dc8fe08
line length fixes, comments++, DECREF vs XDECREF
gpshead f10ece0
Merge branch 'main' into warn/os.fork/threads
gpshead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2022-12-13-17-29-09.gh-issue-100228.bgtzMV.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
A :exc:`DeprecationWarning` may be raised when :func:`os.fork()` or | ||
:func:`os.forkpty()` is called from multi-threaded processes. This is to | ||
help people realize they are doing something unsafe. Lack of a warning | ||
does not indicate that the fork call was actually safe. | ||
gpshead marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.