File: broker_shutdown_test_python.py

package info (click to toggle)
python-mitogen 0.3.3-9%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,816 kB
  • sloc: python: 22,086; sh: 171; makefile: 74; perl: 19; ansic: 18; javascript: 5
file content (9 lines) | stat: -rwxr-xr-x 301 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python
# Delete a semaphore file to allow the main thread to wake up, then sleep for
# 30 seconds before starting the real Python.
import os
import time
import sys
os.unlink(os.environ['BROKER_SHUTDOWN_SEMAPHORE'])
time.sleep(30)
os.execl(sys.executable, sys.executable, *sys.argv[1:])