Moved workaround code slightly.

This commit is contained in:
Arceliar 2013-05-30 19:58:05 +02:00
parent 2ae1ef0d50
commit 2762de52e2

View File

@ -174,6 +174,11 @@ def doCleanShutdown():
print 'Finished flushing inventory.'
printLock.release()
#Messy hack to kill child processes immediately. May not work on all platforms.
try:
os.killpg(os.getpgid(os.getpid()), signal.SIGTERM)
except:
os.kill(os.getpid(), signal.SIGTERM)
if safeConfigGetBoolean('bitmessagesettings','daemon'):
printLock.acquire()
@ -181,12 +186,6 @@ def doCleanShutdown():
printLock.release()
os._exit(0)
#Messy hack to kill child processes immediately. May not work on all platforms.
try:
os.killpg(os.getpgid(os.getpid()), signal.SIGTERM)
except:
os.kill(os.getpid(), signal.SIGTERM)
#Wen you want to command a sendDataThread to do something, like shutdown or send some data, this function puts your data into the queues for each of the sendDataThreads. The sendDataThreads are responsible for putting their queue into (and out of) the sendDataQueues list.
def broadcastToSendDataQueues(data):
#print 'running broadcastToSendDataQueues'