[Erp5-report] r14719 - /erp5/trunk/utils/oood/runserw.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 6 17:26:22 CEST 2007
Author: jacek
Date: Wed Jun 6 17:26:22 2007
New Revision: 14719
URL: http://svn.erp5.org?rev=14719&view=rev
Log:
Fixed bug in stop procedure when oood was run in background
Modified:
erp5/trunk/utils/oood/runserw.py
Modified: erp5/trunk/utils/oood/runserw.py
URL: http://svn.erp5.org/erp5/trunk/utils/oood/runserw.py?rev=14719&r1=14718&r2=14719&view=diff
==============================================================================
--- erp5/trunk/utils/oood/runserw.py (original)
+++ erp5/trunk/utils/oood/runserw.py Wed Jun 6 17:26:22 2007
@@ -85,6 +85,9 @@
os.remove(lock_file_path)
os._exit(0)
+def sig_term_handler(signum, frame):
+ sys.exit(0)
+
def startMultiServer(param):
import config
@@ -165,6 +168,7 @@
print 'All servers should be operational now'
atexit.register(at_exit_handler, lock_file_path)
+ signal.signal(signal.SIGTERM, sig_term_handler)
lock_file = open(lock_file_path, 'w')
server_pid = os.getpid()
@@ -257,7 +261,7 @@
lock_file = open(lock_file_path, 'r')
server_pid = int(lock_file.read())
lock_file.close()
- os.kill(server_pid, signal.SIGINT)
+ os.kill(server_pid, signal.SIGTERM)
Log.info("Server - Stopped properly")
sys.exit(0)
@@ -299,6 +303,7 @@
print message
atexit.register(at_exit_handler, lock_file_path)
+ signal.signal(signal.SIGTERM, sig_term_handler)
# Start the server core
disp = Dispatcher(offset_str)
More information about the Erp5-report
mailing list