[Solved] Cannot send SIGUSR1 signal when daemonized
Added by lighttrick 28 days ago
I am starting lighttpd like this in the source directory where I have compiled it:
src/lighttpd -f "${PWD}/lighttpd-custom.conf" -m "${PWD}"/src/.libs
By default, it is not daemonized and I can send SIGUSR1 signal to reload the config like this:
kill -SIGUSR1 lighty_master_pid_here
But if I start it daemonized like this:
src/lighttpd -D -f "${PWD}/lighttpd-custom.conf" -m "${PWD}"/src/.libs
then sending the above signal kills the master and the child processes. Is this the expected behavior?
lighttpd version: 1.4.78-devel-lighttpd-1.4.77-37-g4e672642
OS: Ubuntu 24.04
Thanks in advance.
Replies (2)
RE: Cannot send SIGUSR1 signal when daemonized - Added by gstrauss 28 days ago
Use absolute paths, i.e. ${PWD}/src/lighttpd
, and also use absolute paths inside lighttpd-custom.conf
When lighttpd daemonizes, one of the steps does the equivalent of chdir /
, so your non-absolute paths may not be found when lighttpd restarts with SIGUSR1 from directory /
RE: [Solved] Cannot send SIGUSR1 signal when daemonized - Added by lighttrick 27 days ago
Indeed, there is a run-away relative path in one of my included config files that I somehow forgot to change to a global variable. Thanks man!