Author: duncan
Date: Thu Dec 28 11:47:26 2006
New Revision: 8835
Modified:
branches/rel-1/freevo/freevo
Log:
[ 1604858 ] 1.7RC1 - Webserver does not shutdown with stop command
Fixed frevo stop command to try SIGINT, SIGTERM and SIGKILL
Modified: branches/rel-1/freevo/freevo
==============================================================================
--- branches/rel-1/freevo/freevo (original)
+++ branches/rel-1/freevo/freevo Thu Dec 28 11:47:26 2006
@@ -162,8 +162,8 @@
proc_arg.remove('-OO')
if proc_arg and ((arg[0].find('runapp') == -1 and \
- len(proc_arg)>2 and arg[1] != proc_arg[1]) or \
- len(proc_arg)>3 and arg[2] != proc_arg[2]):
+ len(proc_arg)>2 and arg[1] != proc_arg[1]) or \
+ len(proc_arg)>3 and arg[2] != proc_arg[2]):
# different proc I guess
try:
os.unlink(fname)
@@ -184,12 +184,23 @@
try:
try:
os.unlink(fname)
- except OSError:
- pass
- os.kill(pid, SIGTERM)
- return 1
- except OSError:
+ except OSError, e:
+ print 'os.unlink(fname=%s)=%s' % (fname, e)
+ os.kill(pid, SIGINT)
return 0
+ except OSError, e:
+ print 'os.kill(pid=%s, SIGINT)=%s' % (pid, e)
+ try:
+ os.kill(pid, SIGTERM)
+ return 0
+ except OSError, e:
+ print 'os.kill(pid=%s, SIGTERM)=%s' % (pid, e)
+ try:
+ os.kill(pid, SIGKILL)
+ return 0
+ except OSError, e:
+ print 'os.kill(pid=%s, SIGKILL)=%s' % (pid, e)
+ return 1
def start(name, arg, bg, store=1):
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog