signal: Remove os.Kill
(SIGKILL) from signal list as it cannot be caught
#9396
Labels
enhancement
Improvements to existing features / behaviour
Is your feature request related to a problem? Please describe.
Currently, the signal list includes
os.Kill
(which corresponds toSIGKILL
), but this signal cannot be caught by the program. SinceSIGKILL
is a non-catchable signal used to immediately terminate processes, including it in the signal list may not have the desired effect.lnd/signal/signal.go
Lines 132 to 137 in a388c1f
Describe the solution you'd like
Remove
os.Kill
from the signal list to ensure that only catchable signals likeSIGTERM
,SIGQUIT
, andos.Interrupt
(which corresponds toSIGINT
) are handled by the program.Describe alternatives you've considered
None. Since
SIGKILL
cannot be caught, including it in the list seems not achieving any functional purpose. Removing it would simplify and streamline the signal handling process.Additional context
This opportunity for improvement was noticed while working on PR #9395.
The text was updated successfully, but these errors were encountered: