Fix signal handler in daemon mode
- signal handler requires the main thread to run
This commit is contained in:
parent
3e6de7a9ad
commit
7a4551e1e7
|
@ -27,6 +27,7 @@ import socket
|
|||
import ctypes
|
||||
from struct import pack
|
||||
from subprocess import call
|
||||
from time import sleep
|
||||
|
||||
from api import MySimpleXMLRPCRequestHandler, StoppableXMLRPCServer
|
||||
from helper_startup import isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections
|
||||
|
@ -315,6 +316,10 @@ class Main:
|
|||
else:
|
||||
BMConfigParser().remove_option('bitmessagesettings', 'dontconnect')
|
||||
|
||||
if daemon:
|
||||
while state.shutdown == 0:
|
||||
sleep(1)
|
||||
|
||||
def daemonize(self):
|
||||
try:
|
||||
if os.fork():
|
||||
|
|
Reference in New Issue
Block a user