diff --git a/bin/linux/restart.py b/bin/linux/restart.py index 96397f82b946..5633f1289aff 100755 --- a/bin/linux/restart.py +++ b/bin/linux/restart.py @@ -3,12 +3,15 @@ # Waits for the parent process to terminate, then executes specified commands. import os +import signal import sys import time if len(sys.argv) < 3: raise Exception('usage: restart.py [optional command]') +signal.signal(signal.SIGHUP, signal.SIG_IGN) + pid = int(sys.argv[1]) while os.getppid() == pid: time.sleep(0.5)