Commit 79a01a60 authored by Ad Schellevis's avatar Ad Schellevis
parent e88cf4b4
...@@ -109,6 +109,9 @@ class Handler(object): ...@@ -109,6 +109,9 @@ class Handler(object):
except KeyboardInterrupt: except KeyboardInterrupt:
# exit on <ctrl><c> # exit on <ctrl><c>
raise raise
except SystemExit:
# stop process handler on system exit
return
except: except:
# something went wrong... send traceback to syslog, restart listener (wait for a short time) # something went wrong... send traceback to syslog, restart listener (wait for a short time)
print (traceback.format_exc()) print (traceback.format_exc())
...@@ -174,6 +177,9 @@ class HandlerClient(threading.Thread): ...@@ -174,6 +177,9 @@ class HandlerClient(threading.Thread):
# send end of stream characters # send end of stream characters
self.connection.sendall("%c%c%c"%(chr(0),chr(0),chr(0))) self.connection.sendall("%c%c%c"%(chr(0),chr(0),chr(0)))
except SystemExit:
# ignore system exit related errors
pass
except: except:
print (traceback.format_exc()) print (traceback.format_exc())
syslog.syslog(syslog.LOG_ERR, syslog.syslog(syslog.LOG_ERR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment