diff --git a/api_app.py b/api_app.py index 33a6d6e..bdb7504 100644 --- a/api_app.py +++ b/api_app.py @@ -139,7 +139,10 @@ log_folder = config['Settings']['log_folder'] # Start subprocess to watch KISS connection import subprocess -subprocess.Popen(["python3","kiss_and_db.py"]) +#proc = subprocess.Popen(["python3","kiss_and_db.py"]) +# Combine under one process https://stackoverflow.com/a/13143013/2152245 +proc = subprocess.Popen("exec " + "python3 kiss_and_db.py", stdout=subprocess.PIPE, shell=True) +print("kiss_and_db.py as subprocess pid "+str(proc.pid)) api.add_resource(Packets, '/packets')