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
6940b230
Commit
6940b230
authored
Mar 17, 2018
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue #150: ansible: mark worker/child sock as CLOEXEC.
parent
7a394dc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
ansible_mitogen/process.py
ansible_mitogen/process.py
+5
-2
No files found.
ansible_mitogen/process.py
View file @
6940b230
...
@@ -61,11 +61,11 @@ class MuxProcess(object):
...
@@ -61,11 +61,11 @@ class MuxProcess(object):
#: In the top-level process, this references one end of a socketpair(),
#: In the top-level process, this references one end of a socketpair(),
#: which the MuxProcess blocks reading from in order to determine when
#: which the MuxProcess blocks reading from in order to determine when
#: the master process d
e
ies. Once the read returns, the MuxProcess will
#: the master process dies. Once the read returns, the MuxProcess will
#: begin shutting itself down.
#: begin shutting itself down.
worker_sock
=
None
worker_sock
=
None
#: In the worker process, this references the other end of
the
#: In the worker process, this references the other end of
#: :py:attr:`worker_sock`.
#: :py:attr:`worker_sock`.
child_sock
=
None
child_sock
=
None
...
@@ -87,6 +87,9 @@ class MuxProcess(object):
...
@@ -87,6 +87,9 @@ class MuxProcess(object):
cls
.
unix_listener_path
=
mitogen
.
unix
.
make_socket_path
()
cls
.
unix_listener_path
=
mitogen
.
unix
.
make_socket_path
()
cls
.
worker_sock
,
cls
.
child_sock
=
socket
.
socketpair
()
cls
.
worker_sock
,
cls
.
child_sock
=
socket
.
socketpair
()
mitogen
.
core
.
set_cloexec
(
cls
.
worker_sock
)
mitogen
.
core
.
set_cloexec
(
cls
.
child_sock
)
cls
.
child_pid
=
os
.
fork
()
cls
.
child_pid
=
os
.
fork
()
ansible_mitogen
.
logging
.
setup
()
ansible_mitogen
.
logging
.
setup
()
if
cls
.
child_pid
:
if
cls
.
child_pid
:
...
...
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