File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66On some systems (e.g. Solaris without posix threads) we find that all
77active threads survive in the child after a fork(); this is an error.
88
9- On BeOS, you CANNOT mix threads and fork(), the behaviour is undefined.
10- That's OK, fork() is a grotesque hack anyway. ;-) [cjh]
11-
9+ While BeOS doesn't officially support fork and native threading in
10+ the same application, the present example should work just fine. DC
1211"""
1312
1413import os , sys , time , thread
1514from test_support import verify , verbose , TestSkipped
1615
17- try :
18- if os .uname ()[0 ] == "BeOS" :
19- raise TestSkipped , "can't mix os.fork with threads on BeOS"
20- except AttributeError :
21- pass
22-
2316try :
2417 os .fork
2518except AttributeError :
Original file line number Diff line number Diff line change 44"""
55
66import os
7+ import sys
8+ from test_support import TestSkipped
79
810# popen2 contains its own testing routine
911# which is especially useful to see if open files
1214
1315def main ():
1416 print "Test popen2 module:"
17+ if sys .platform [:4 ] == 'beos' and __name__ != '__main__' :
18+ # Locks get messed up or something. Generally we're supposed
19+ # to avoid mixing "posix" fork & exec with native threads, and
20+ # they may be right about that after all.
21+ raise TestSkipped , "popen2() doesn't work during import on BeOS"
1522 try :
1623 from os import popen
1724 except ImportError :
You can’t perform that action at this time.
0 commit comments