mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Works around issue3863: freebsd4/5/6 and os2emx are known to have OS bugs when
calling fork() from a child thread. This disables that unit test (with a note printed to stderr) on those platforms. A caveat about buggy platforms is added to the os.fork documentation.
This commit is contained in:
parent
f40200b214
commit
0806749e63
3 changed files with 13 additions and 0 deletions
|
@ -380,6 +380,12 @@ class ThreadJoinOnShutdown(unittest.TestCase):
|
|||
import os
|
||||
if not hasattr(os, 'fork'):
|
||||
return
|
||||
# Skip platforms with known problems forking from a worker thread.
|
||||
# See http://bugs.python.org/issue3863.
|
||||
if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'os2emx'):
|
||||
print >>sys.stderr, ('Skipping test_3_join_in_forked_from_thread'
|
||||
' due to known OS bugs on'), sys.platform
|
||||
return
|
||||
script = """if 1:
|
||||
main_thread = threading.current_thread()
|
||||
def worker():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue