Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unbind interrupt signal handlers as soon as process function terminates
The `run_get_node` method of process functions attaches a `kill_process` handler to interrupt signals, such that when the funtion process is interrupted during execution, it is properly cleaned up, for example by setting the process state on the node to `Killed`. These handlers were, however, not properly unbound after the process was terminated and so would be triggered even after the process instance was no longer alive. This would cause the `kill_process` handler to hang. In the case of a daemon runner, this would prevent the python process from shutting down. This manifested itself in `verdi daemon stop` timing out if one of the daemon runners had run just a single process function. Note that the previous commit already fixed this problem in a different way, by not even attaching the interrupt handlers for process function in the first place. But the reasoning for that is different.
- Loading branch information