From b0f0a4f8dcd25df2ccde9227462a7d1821ebd79f Mon Sep 17 00:00:00 2001 From: W1CDN Date: Sun, 9 Jul 2023 09:37:03 -0500 Subject: [PATCH] Try to combine all the processes to there aren't orphans. --- api_app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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')