Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fc3fc337
Commit
fc3fc337
authored
Jan 30, 2001
by
Moshe Zadka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checking in patch #103478 -- makes popen2 and fork1 tested on BeOS.
Tested for not breaking builds on Linux.
parent
87eb4f8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
Lib/test/test_fork1.py
Lib/test/test_fork1.py
+2
-9
Lib/test/test_popen2.py
Lib/test/test_popen2.py
+7
-0
No files found.
Lib/test/test_fork1.py
View file @
fc3fc337
...
...
@@ -6,20 +6,13 @@ child after a fork().
On some systems (e.g. Solaris without posix threads) we find that all
active threads survive in the child after a fork(); this is an error.
On BeOS, you CANNOT mix threads and fork(), the behaviour is undefined.
That's OK, fork() is a grotesque hack anyway. ;-) [cjh]
While BeOS doesn't officially support fork and native threading in
the same application, the present example should work just fine. DC
"""
import
os
,
sys
,
time
,
thread
from
test_support
import
verify
,
verbose
,
TestSkipped
try
:
if
os
.
uname
()[
0
]
==
"BeOS"
:
raise
TestSkipped
,
"can't mix os.fork with threads on BeOS"
except
AttributeError
:
pass
try
:
os
.
fork
except
AttributeError
:
...
...
Lib/test/test_popen2.py
View file @
fc3fc337
...
...
@@ -4,6 +4,8 @@
"""
import
os
import
sys
from
test_support
import
TestSkipped
# popen2 contains its own testing routine
# which is especially useful to see if open files
...
...
@@ -12,6 +14,11 @@ import os
def
main
():
print
"Test popen2 module:"
if
sys
.
platform
[:
4
]
==
'beos'
and
__name__
!=
'__main__'
:
# Locks get messed up or something. Generally we're supposed
# to avoid mixing "posix" fork & exec with native threads, and
# they may be right about that after all.
raise
TestSkipped
,
"popen2() doesn't work during import on BeOS"
try
:
from
os
import
popen
except
ImportError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment