From ac787d90a8d8d1efaa25e20072c688f5fccbd363 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 6 May 2013 11:32:40 -0400 Subject: [PATCH] use os._exit(0) instead of sys.exit() --- src/bitmessagemain.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 0abfcfd8..e8d5bbdf 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -2214,7 +2214,7 @@ def calculateTestnetAddressFromPubkey(pubkey): def signal_handler(signal, frame): if shared.safeConfigGetBoolean('bitmessagesettings','daemon'): shared.doCleanShutdown() - sys.exit(0) + sys.exit() else: print 'Unfortunately you cannot use Ctrl+C when running the UI because the UI captures the signal.' @@ -2322,7 +2322,7 @@ class sqlThread(threading.Thread): shared.printLock.release() else: sys.stderr.write('ERROR trying to create database file (message.dat). Error message: %s\n' % str(err)) - sys.exit() + os._exit(0) #People running earlier versions of PyBitmessage do not have the usedpersonally field in their pubkeys table. Let's add it. if shared.config.getint('bitmessagesettings','settingsversion') == 2: @@ -2402,7 +2402,7 @@ class sqlThread(threading.Thread): if transmitdata == '': sys.stderr.write('Problem: The version of SQLite you have cannot store Null values. Please download and install the latest revision of your version of Python (for example, the latest Python 2.7 revision) and try again.\n') sys.stderr.write('PyBitmessage will now exist very abruptly. You may now see threading errors related to this abrupt exit but the problem you need to solve is related to SQLite.\n\n') - sys.exit() + os._exit(0) except Exception, err: print err @@ -3769,7 +3769,7 @@ if __name__ == "__main__": # Check the Major version, the first element in the array if sqlite3.sqlite_version_info[0] < 3: print 'This program requires sqlite version 3 or higher because 2 and lower cannot store NULL values. I see version:', sqlite3.sqlite_version_info - sys.exit() + os._exit(0) #First try to load the config file (the keys.dat file) from the program directory shared.config = ConfigParser.SafeConfigParser()