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
d9a8e965
Commit
d9a8e965
authored
Sep 19, 2000
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only supply popen2, popen3 when fork exists.
(This avoids defining non-working versions of these on the Mac.)
parent
9e8181b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
Lib/os.py
Lib/os.py
+15
-13
No files found.
Lib/os.py
View file @
d9a8e965
...
...
@@ -454,16 +454,18 @@ otherwise return -SIG, where SIG is the signal that killed it. """
return
spawnvpe
(
mode
,
file
,
args
[:
-
1
],
env
)
if
not
_exists
(
"popen2"
):
def
popen2
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
assert
mode
[:
1
]
in
(
"b"
,
"t"
)
import
popen2
stdout
,
stdin
=
popen2
.
popen2
(
cmd
,
bufsize
)
return
stdin
,
stdout
if
not
_exists
(
"popen3"
):
def
popen3
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
assert
mode
[:
1
]
in
(
"b"
,
"t"
)
import
popen2
stdout
,
stdin
,
stderr
=
popen2
.
popen3
(
cmd
,
bufsize
)
return
stdin
,
stdout
,
stderr
# Supply popen2 etc. (for Unix)
if
_exists
(
"fork"
):
if
not
_exists
(
"popen2"
):
def
popen2
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
assert
mode
[:
1
]
in
(
"b"
,
"t"
)
import
popen2
stdout
,
stdin
=
popen2
.
popen2
(
cmd
,
bufsize
)
return
stdin
,
stdout
if
not
_exists
(
"popen3"
):
def
popen3
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
assert
mode
[:
1
]
in
(
"b"
,
"t"
)
import
popen2
stdout
,
stdin
,
stderr
=
popen2
.
popen3
(
cmd
,
bufsize
)
return
stdin
,
stdout
,
stderr
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