Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
3a6be55e
Commit
3a6be55e
authored
Oct 07, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use kill, when possible, to shutdown a stale test server.
parent
b6161405
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
src/ZEO/tests/zeoserver.py
src/ZEO/tests/zeoserver.py
+18
-5
No files found.
src/ZEO/tests/zeoserver.py
View file @
3a6be55e
...
...
@@ -20,6 +20,7 @@ import errno
import
getopt
import
random
import
socket
import
signal
import
asyncore
import
threading
import
ThreadedAsync.LoopCallback
...
...
@@ -127,14 +128,26 @@ class Suicide(threading.Thread):
# chance that the server gives up before the clients.
time
.
sleep
(
330
)
log
(
"zeoserver"
,
"suicide thread invoking shutdown"
)
# If the server hasn't shut down yet, the client may not be
# able to connect to it. If so, try to kill the process to
# force it to shutdown.
if
hasattr
(
os
,
"kill"
):
os
.
kill
(
pid
,
signal
.
SIGTERM
)
time
.
sleep
(
5
)
os
.
kill
(
pid
,
signal
.
SIGKILL
)
else
:
from
ZEO.tests.forker
import
shutdown_zeo_server
# XXX If the -k option was given to zeoserver, then the process will
# go away but the temp files won't get cleaned up.
# XXX If the -k option was given to zeoserver, then the
# process will go away but the temp files won't get
# cleaned up.
shutdown_zeo_server
(
self
.
_adminaddr
)
def
main
():
label
=
'zeoserver:%d'
%
os
.
getpid
()
global
pid
pid
=
os
.
getpid
()
label
=
'zeoserver:%d'
%
pid
log
(
label
,
'starting'
)
# We don't do much sanity checking of the arguments, since if we get it
...
...
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