reorder setsid and kill
This commit is contained in:
parent
dae2624b30
commit
2b4c3619d6
1 changed files with 3 additions and 3 deletions
|
@ -123,12 +123,12 @@ def daemon_start(pid_file, log_file):
|
|||
os.kill(ppid, signal.SIGINT)
|
||||
sys.exit(1)
|
||||
|
||||
print('started')
|
||||
os.kill(ppid, signal.SIGTERM)
|
||||
|
||||
os.setsid()
|
||||
signal.signal(signal.SIG_IGN, signal.SIGHUP)
|
||||
|
||||
print('started')
|
||||
os.kill(ppid, signal.SIGTERM)
|
||||
|
||||
sys.stdin.close()
|
||||
try:
|
||||
freopen(log_file, 'a', sys.stdout)
|
||||
|
|
Loading…
Reference in a new issue