Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
03ab520d
Commit
03ab520d
authored
Jul 10, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subprocess: remove nonblock flag from file descriptors in child process (fixes issue #134)
parent
4fd25fde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
gevent/subprocess.py
gevent/subprocess.py
+5
-0
No files found.
gevent/subprocess.py
View file @
03ab520d
...
...
@@ -553,6 +553,10 @@ class Popen(object):
else
:
fcntl
.
fcntl
(
fd
,
fcntl
.
F_SETFD
,
old
&
~
cloexec_flag
)
def
_remove_nonblock_flag
(
self
,
fd
):
flags
=
fcntl
.
fcntl
(
fd
,
fcntl
.
F_GETFL
)
&
(
~
os
.
O_NONBLOCK
)
fcntl
.
fcntl
(
fd
,
fcntl
.
F_SETFL
,
flags
)
def
pipe_cloexec
(
self
):
"""Create a pipe with FDs set CLOEXEC."""
# Pipes' FDs are set CLOEXEC by default because we don't want them
...
...
@@ -645,6 +649,7 @@ class Popen(object):
self
.
_set_cloexec_flag
(
a
,
False
)
elif
a
is
not
None
:
os
.
dup2
(
a
,
b
)
self
.
_remove_nonblock_flag
(
b
)
_dup2
(
p2cread
,
0
)
_dup2
(
c2pwrite
,
1
)
_dup2
(
errwrite
,
2
)
...
...
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