]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: When clearing signal handlers, ignore the signals instead of restoring defaults
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 6 Aug 2020 14:46:07 +0000 (17:46 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 10 Aug 2020 11:16:43 +0000 (11:16 +0000)
commit75693aa152daeee2d81bb8025dbf9bfbbfbca12b
tree6d8cd1f4d1a92722179e0cf3abc849d15cfa3e9d
parentd0ea7f9f4530878a40ae0275cf0c36d3ff9111fc
lib: When clearing signal handlers, ignore the signals instead of restoring defaults

This is mainly happening in while the process is shutting down. Getting a
signal at a time when the normal signal handlers are gone isn't something
that is expected. It's better to just ignore the signal and let the process
to finish shutting down normally instead of getting killed.

This should also fix some unit tests where the child processes were
sometimes dying with SIGTERM due to these race conditions.
src/lib-test/test-subprocess.c
src/lib/lib-signals.c
src/lib/lib-signals.h