dont daemonize on restart
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# $Id: hbd,v 1.13 2006/11/07 20:21:43 andreas Exp $
|
||||
# $Id: hbd,v 1.14 2006/11/07 20:25:21 andreas Exp $
|
||||
# Wait for heartbeat messages and act on them (or their absence)
|
||||
#
|
||||
import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle
|
||||
@@ -560,14 +560,13 @@ ilist.append(sock)
|
||||
serv=SocketServer.TCPServer((hbd_host,hbd_port),HtmlHandler)
|
||||
ilist.append(serv.fileno())
|
||||
|
||||
if not forground:
|
||||
if not restart:
|
||||
pid=os.fork()
|
||||
if pid > 0:
|
||||
if verbose:
|
||||
print "daemoinizing... pid=%d" % pid
|
||||
sys.exit(0)
|
||||
|
||||
if not forground and not restart:
|
||||
pid=os.fork()
|
||||
if pid > 0:
|
||||
if verbose:
|
||||
print "daemoinizing... pid=%d" % pid
|
||||
sys.exit(0)
|
||||
|
||||
verbose=False
|
||||
os.close(0)
|
||||
os.close(1)
|
||||
|
||||
Reference in New Issue
Block a user