Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
nexedi
re6stnet
Commits
4ea3e7be
Commit
4ea3e7be
authored
Dec 11, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not send TERM signal to a process that has already been waited on
parent
f3a69c98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
re6st/tunnel.py
re6st/tunnel.py
+2
-2
re6st/utils.py
re6st/utils.py
+2
-1
No files found.
re6st/tunnel.py
View file @
4ea3e7be
...
...
@@ -86,8 +86,8 @@ class Connection(object):
def
close
(
self
):
try
:
self
.
process
.
stop
()
except
(
AttributeError
,
OSError
)
:
pass
# we already polled an exited process
except
AttributeError
:
pass
def
refresh
(
self
):
# Check that the connection is alive
...
...
re6st/utils.py
View file @
4ea3e7be
...
...
@@ -156,10 +156,11 @@ class Popen(subprocess.Popen):
self
.
returncode
=
-
1
def
stop
(
self
):
if
self
.
pid
:
if
self
.
pid
and
self
.
returncode
is
None
:
self
.
terminate
()
t
=
threading
.
Timer
(
5
,
self
.
kill
)
t
.
start
()
# PY3: use waitid(WNOWAIT) and call self.poll() after t.cancel()
r
=
self
.
wait
()
t
.
cancel
()
return
r
...
...
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