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
8d4005c2
Commit
8d4005c2
authored
Sep 20, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fakessh: fix non-master context ID allocation.
parent
bd8001d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
mitogen/fakessh.py
mitogen/fakessh.py
+7
-3
No files found.
mitogen/fakessh.py
View file @
8d4005c2
...
...
@@ -315,8 +315,9 @@ def _fakessh_main(mitogen_, dest_context_id):
# Public API.
#
@
mitogen
.
core
.
takes_econtext
@
mitogen
.
core
.
takes_router
def
run
(
dest
,
router
,
args
,
deadline
=
None
):
def
run
(
dest
,
router
,
args
,
deadline
=
None
,
econtext
=
None
):
"""
Run the command specified by the argument vector `args` such that ``PATH``
searches for SSH by the command will cause its attempt to use SSH to
...
...
@@ -335,9 +336,12 @@ def run(dest, router, args, deadline=None):
:returns:
Exit status of the child process.
"""
context_id
=
router
.
context_id_counter
.
next
()
if
econtext
is
not
None
:
mitogen
.
master
.
upgrade_router
(
econtext
)
context_id
=
router
.
allocate_id
()
fakessh
=
mitogen
.
master
.
Context
(
router
,
context_id
)
fakessh
.
name
=
'fakessh
'
fakessh
.
name
=
'fakessh
.%d'
%
(
context_id
,)
sock1
,
sock2
=
socket
.
socketpair
()
mitogen
.
core
.
set_cloexec
(
sock1
.
fileno
())
...
...
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