Which signal is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files?
killall -s _______ daemon
Correct Answer: B
The signal that is missing from the following command that is commonly used to instruct a daemon to reinitialize itself, including reading configuration files, is SIGHUP. The command should be:
kill -HUP pid
The option -HUP specifies the signal to be sent to the process, which is the hangup signal (SIGHUP). This signal is traditionally used to notify a process that the controlling terminal has been closed, but it is also commonly used to instruct a daemon to reinitialize itself, such as reloading its configuration files or reopening its log files. The argument pid is the process ID of the daemon to be reinitialized. For example, to reinitialize the nginx web server daemon with the PID 1234, the command would be:
kill -HUP 1234
This will cause the nginx daemon to reload its configuration files and gracefully restart its worker processes1.
The other signals are not commonly used for this purpose, as they have different meanings and effects. For example, SIGTERM requests the process to terminate gracefully, SIGKILL forces the process to terminate immediately, SIGSTOP suspends the process, and SIGCONT resumes the process2. References:
* Controlling nginx - nginx 1.21.3 documentation
* Linux Signals - GeeksforGeeks