unix/SignalHandlers: shut down if parent process dies in --no-daemon mode
By default, if the parent of a process dies, the process gets SIGHUP and is supposed to shut down. This however doesn't work for MPD, because MPD redefines SIGHUP with a different meaning (like most daemons do). To work around this, we configure the kernel to send SIGTERM instead of SIGHUP. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
This commit is contained in:
@@ -23,15 +23,15 @@
|
||||
struct Instance;
|
||||
|
||||
void
|
||||
SignalHandlersInit(Instance &instance);
|
||||
SignalHandlersInit(Instance &instance, bool daemon);
|
||||
|
||||
void
|
||||
SignalHandlersFinish() noexcept;
|
||||
|
||||
class ScopeSignalHandlersInit {
|
||||
public:
|
||||
ScopeSignalHandlersInit(Instance &instance) {
|
||||
SignalHandlersInit(instance);
|
||||
ScopeSignalHandlersInit(Instance &instance, bool daemon) {
|
||||
SignalHandlersInit(instance, daemon);
|
||||
}
|
||||
|
||||
~ScopeSignalHandlersInit() noexcept {
|
||||
|
Reference in New Issue
Block a user