and ioloop.set_blocking_log_threshold doesn't cause the new process
to get killed.
import sys
import types
+try:
+ import signal
+except ImportError:
+ signal = None
+
def start(io_loop=None, check_time=500):
"""Restarts the process automatically when a module is modified.
os.close(fd)
except:
pass
+ if hasattr(signal, "setitimer"):
+ # Clear the alarm signal set by
+ # ioloop.set_blocking_log_threshold so it doesn't fire
+ # after the exec.
+ signal.setitimer(signal.ITIMER_REAL, 0, 0)
try:
os.execv(sys.executable, [sys.executable] + sys.argv)
except OSError, e: