diff options
| author | Gregory P. Smith <greg@mad-scientist.com> | 2008-09-30 20:41:13 (GMT) | 
|---|---|---|
| committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-09-30 20:41:13 (GMT) | 
| commit | 0806749e631ab4e24f78df347a9d932bbc3cb6c7 (patch) | |
| tree | c8cab45d2960f3bd4beef7c713c7dc0cc8f4d1c3 /Lib/test/test_threading.py | |
| parent | f40200b21475998b262e2aa0ec5b909ddde34be2 (diff) | |
| download | cpython-0806749e631ab4e24f78df347a9d932bbc3cb6c7.zip cpython-0806749e631ab4e24f78df347a9d932bbc3cb6c7.tar.gz cpython-0806749e631ab4e24f78df347a9d932bbc3cb6c7.tar.bz2  | |
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.
Diffstat (limited to 'Lib/test/test_threading.py')
| -rw-r--r-- | Lib/test/test_threading.py | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 4e87437..c8f9cac 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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():  | 
