The Python's method signal.signal can only be used to assign one signal handler, and if you call it again, it will remove the previous handler. Considering our reliance on this method in the subprocess module to handle SIGTERMs and gracefully shutdown processes, we need to make sure it is not accidentally called somewhere else, as that will break our logic.
Acceptance Criteria
Implement a quality check like the one for pip that scans our code and ensure the signal.signal method is only called in one place in the subprocess module.
Overview
The Python's method
signal.signal
can only be used to assign one signal handler, and if you call it again, it will remove the previous handler. Considering our reliance on this method in thesubprocess
module to handle SIGTERMs and gracefully shutdown processes, we need to make sure it is not accidentally called somewhere else, as that will break our logic.Acceptance Criteria
pip
that scans our code and ensure thesignal.signal
method is only called in one place in thesubprocess
module.Additional Info
N/A