parent
8ae9025323
commit
1dbea86f7d
2 changed files with 15 additions and 2 deletions
@ -1,12 +1,25 @@ |
|||||||
import os |
import os |
||||||
import subprocess |
import subprocess |
||||||
|
import sys |
||||||
|
import signal |
||||||
|
import time |
||||||
|
|
||||||
from openpilot.common.basedir import BASEDIR |
from openpilot.common.basedir import BASEDIR |
||||||
|
|
||||||
|
|
||||||
|
def signal_handler(sig, frame): |
||||||
|
print('python process got signal', sig) |
||||||
|
# time.sleep(5) |
||||||
|
# sys.exit() |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main(): |
def main(): |
||||||
print('pandad!') |
print('pandad!') |
||||||
|
|
||||||
|
# SystemExit on sigterm |
||||||
|
# signal.signal(signal.SIGTERM, signal_handler) |
||||||
|
|
||||||
while True: |
while True: |
||||||
os.chdir(os.path.join(BASEDIR)) |
os.chdir(os.path.join(BASEDIR)) |
||||||
subprocess.run(["python", "cpp_process.py"], check=True) |
subprocess.run(["python", "cpp_process.py"], check=True) |
||||||
|
Loading…
Reference in new issue