-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGHUP only properly handled once; subsequent times kill lightningd
#4240
Comments
Lines 643 to 648 in 66b2bb9
What is particularly strange is the use of Line 645 in 66b2bb9
According to https://www.man7.org/linux/man-pages/man2/sigaction.2.html
"Restore the signal action to the default" means that the signal handler is removed, then replaced with the default action. In the case of SIGHUP, that means the default behavior --- killing the process --- is restored after one use of the SIGHUP signal, which is precisely what I see. #1847 which introduced this feature, the use of |
Fixes: ElementsProject#4240 ChangeLog-Fixed: log: Do not terminate on the second received SIGHUP.
Fixes: ElementsProject#4240 ChangeLog-Fixed: log: Do not terminate on the second received SIGHUP.
Fixes: #4240 ChangeLog-Fixed: log: Do not terminate on the second received SIGHUP.
Fixes: ElementsProject#4240 ChangeLog-Fixed: log: Do not terminate on the second received SIGHUP.
For those wondering (like myself) why
|
I have my
lightningd
onlogrotate
with akillall -s SIGHUP lightningd
. Thelogrotate
is set up to rotate once a day at midnight.lightningd
does the log rotation correctly onSIGHUP
once, but the second one kills it.Looking at the logs, at the top of the log of odd-numbered days:
But on logs of even-numbered days:
Version is the 0.9.2 release, unmodified.
The text was updated successfully, but these errors were encountered: