]> Sergey Matveev's repositories - public-inbox.git/commit
daemon: use sigprocmask to block signals at startup
authorEric Wong <e@80x24.org>
Sun, 24 Nov 2019 00:22:28 +0000 (00:22 +0000)
committerEric Wong <e@80x24.org>
Sun, 24 Nov 2019 21:35:16 +0000 (21:35 +0000)
commit81a9a43fb858d197ffd1532d73f9f22739f940ff
treec83f6cde682c953d512eb2b84034a4fa0a2a8b42
parent11eddc4ddbffc6fee5f329735c47f1558e6a40c6
daemon: use sigprocmask to block signals at startup

`$SIG{FOO} = "IGNORE"' will cause the daemon to miss signals
entirely.  Instead, we can use sigprocmask to block signal
delivery until we have our signal handlers setup.  This closes a
race where a PID file can be written for an init script and a
signal to be dropped via "IGNORE".
lib/PublicInbox/Daemon.pm