GeminiDRSoftware / DRAGONS

Data Reduction for Astronomy from Gemini Observatory North and South
Other
27 stars 16 forks source link

DRAGONS Subprocess Unable to Cleanly Shutdown in Background Worker with GOATS #460

Closed davner closed 4 months ago

davner commented 4 months ago

Description:

DRAGONS has an issue where the loop_process in gempy.eti_core.eti cannot cleanly shut down when executed as a background worker through GOATS. The problem lies in the loop handling for a subprocess. A continue statement in the loop’s exception handling for KeyboardInterrupt prevents the loop from exiting. This behavior traps the cleanup in a perpetual state, making it unresponsive to typical shutdown signals and requiring forceful termination.

Proposed Fix:

Replace the continue statement with a break in the loop handling for KeyboardInterrupt. This change will allow the loop to exit upon receiving a shutdown signal. Implementing this fix will ensure that DRAGONS can terminate its subprocess properly, even when running as a background worker in multi-threaded environments like with GOATS.