projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39f218a
)
If do_stop attempts to stop a nonexistent process the OSError exception is caught...
author
wilcoxjg
<wilcoxjg@gmail.com>
Thu, 9 Aug 2007 15:57:45 +0000
(08:57 -0700)
committer
wilcoxjg
<wilcoxjg@gmail.com>
Thu, 9 Aug 2007 15:57:45 +0000
(08:57 -0700)
src/allmydata/scripts/startstop_node.py
patch
|
blob
|
history
diff --git
a/src/allmydata/scripts/startstop_node.py
b/src/allmydata/scripts/startstop_node.py
index 557578e56029ee046a81ee325392d6eef23f5f6b..d688cf295648ac5396f6082c13d4bc58e5fe3683 100644
(file)
--- a/
src/allmydata/scripts/startstop_node.py
+++ b/
src/allmydata/scripts/startstop_node.py
@@
-91,7
+91,14
@@
def do_stop(basedir, config, out=sys.stdout, err=sys.stderr):
pid = int(pid)
timer = 0
- os.kill(pid, signal.SIGTERM)
+ try:
+ os.kill(pid, signal.SIGTERM)
+ except OSError, oserr:
+ if oserr.errno == 3:
+ print oserr.strerror
+ return 1
+ else:
+ raise
time.sleep(0.1)
while timer < 5:
# poll once per second until twistd.pid goes away, up to 5 seconds