def restart(reason, *args, **kwargs):
    logging.info("Restarting: %s" % reason)
    os.execv(sys.argv[0], sys.argv)
Perform a complete restart of the current process using exec()
dataset/ETHPy150Open nigelkersten/pymacadmin/bin/crankd.py/restart