Skip to content

Commit

Permalink
Update GUI.py
Browse files Browse the repository at this point in the history
improving killproc to make sure it gets to all procs
  • Loading branch information
ISS-Mimic authored Dec 11, 2024
1 parent 70828fe commit cc63e38
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions Pi/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,11 +1248,23 @@ def killproc(*args):
global p,p2,c,TDRSproc
c.execute("INSERT OR IGNORE INTO telemetry VALUES('Lightstreamer', '0', 'Unsubscribed', '0', 0)")
try:
p.kill()
p2.kill()
TDRSproc.kill()
if p:
p.kill()
except Exception as e:
log_error(e)
log_error(f"Failed to kill p: {e}")

try:
if p2:
p2.kill()
except Exception as e:
log_error(f"Failed to kill p2: {e}")

try:
if TDRSproc:
TDRSproc.kill()
except Exception as e:
log_error(f"Failed to kill TDRSproc: {e}")


class CDH_Screen(Screen, EventDispatcher):
mimic_directory = op.abspath(op.join(__file__, op.pardir, op.pardir, op.pardir))
Expand Down

0 comments on commit cc63e38

Please sign in to comment.