Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
a956aa40
Commit
a956aa40
authored
Mar 23, 2018
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate set_cloexec calls everywhere
Now it's handled in Side() constructor, it can disappear elsewhere.
parent
732a6102
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
8 deletions
+0
-8
mitogen/core.py
mitogen/core.py
+0
-4
mitogen/fakessh.py
mitogen/fakessh.py
+0
-1
mitogen/unix.py
mitogen/unix.py
+0
-3
No files found.
mitogen/core.py
View file @
a956aa40
...
...
@@ -844,8 +844,6 @@ class Stream(BasicStream):
# TODO: what is this os.dup for?
self
.
receive_side
=
Side
(
self
,
os
.
dup
(
rfd
))
self
.
transmit_side
=
Side
(
self
,
os
.
dup
(
wfd
))
set_cloexec
(
self
.
receive_side
.
fd
)
set_cloexec
(
self
.
transmit_side
.
fd
)
def
__repr__
(
self
):
cls
=
type
(
self
)
...
...
@@ -1025,8 +1023,6 @@ class Waker(BasicStream):
def
__init__
(
self
,
broker
):
self
.
_broker
=
broker
rfd
,
wfd
=
os
.
pipe
()
set_cloexec
(
rfd
)
set_cloexec
(
wfd
)
self
.
receive_side
=
Side
(
self
,
rfd
)
self
.
transmit_side
=
Side
(
self
,
wfd
)
...
...
mitogen/fakessh.py
View file @
a956aa40
...
...
@@ -322,7 +322,6 @@ def run(dest, router, args, deadline=None, econtext=None):
fakessh
.
name
=
'fakessh.%d'
%
(
context_id
,)
sock1
,
sock2
=
socket
.
socketpair
()
mitogen
.
core
.
set_cloexec
(
sock1
.
fileno
())
stream
=
mitogen
.
core
.
Stream
(
router
,
context_id
)
stream
.
name
=
'fakessh'
...
...
mitogen/unix.py
View file @
a956aa40
...
...
@@ -74,9 +74,6 @@ class Listener(mitogen.core.BasicStream):
self
.
_sock
.
bind
(
self
.
path
)
os
.
chmod
(
self
.
path
,
0600
)
self
.
_sock
.
listen
(
backlog
)
mitogen
.
core
.
set_nonblock
(
self
.
_sock
.
fileno
())
mitogen
.
core
.
set_cloexec
(
self
.
_sock
.
fileno
())
self
.
path
=
self
.
_sock
.
getsockname
()
self
.
receive_side
=
mitogen
.
core
.
Side
(
self
,
self
.
_sock
.
fileno
())
router
.
broker
.
start_receive
(
self
)
...
...
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