Skip to content

Commit

Permalink
fix: get back to sys.exit
Browse files Browse the repository at this point in the history
Otherwise we end up with zombie processes
  • Loading branch information
bpiwowar committed Mar 6, 2024
1 parent 2d180a1 commit 52485a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/experimaestro/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def handle_error(self, code, frame_type):
self.failedpath.write_text(str(code))
self.cleanup()
logger.info("Exiting")
os._exit(1)
sys.exit(1)

def run(self):
atexit.register(self.cleanup)
Expand Down Expand Up @@ -130,7 +130,7 @@ def run(self):
run(workdir / "params.json")

# Everything went OK
os._exit(0)
sys.exit(0)
except Exception:
logger.exception("Got exception while running")
self.handle_error(1, None)
Expand Down

0 comments on commit 52485a5

Please sign in to comment.