]> git.ipfire.org Git - thirdparty/pdns.git/commit
Add signal handling for SIGTERM and SIGINT in pdns_recursor
authorFrank Louwers <frank@louwers.be>
Wed, 25 Sep 2019 10:07:14 +0000 (12:07 +0200)
committerFrank Louwers <frank@louwers.be>
Wed, 25 Sep 2019 12:02:11 +0000 (14:02 +0200)
commit9f3741877767c49fea8262732d16e894fd58f925
treeb8da55d6235b3dea2baaf6e634bd71cf483de4f7
parentc604f94f188065079b157b65841adeb6e092d63b
Add signal handling for SIGTERM and SIGINT in pdns_recursor

The Linux kernel handles signals for PID 1 processes differently. It
doesn't implement a default handler for some signals such as
SIGTERM/SIGINT.

When running pdns_recursor as a container, this causes a few annoyances.
You can work around those by running your containers with --init or by
installing `tini` inside the container. Or you can handle the signals in
the application itself.

This commit adds signal() handlers for SIGTERM and SIGINT for
pdns_recursor.
pdns/pdns_recursor.cc
pdns/rec_channel.hh
pdns/rec_channel_rec.cc