Main: notify systemd when MPD is ready
This commit is contained in:
parent
400e3ea649
commit
7b575f61d0
@ -106,6 +106,10 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_SYSTEMD_DAEMON
|
||||||
|
#include <systemd/sd-daemon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
@ -662,6 +666,10 @@ static int mpd_main_after_fork(struct options options)
|
|||||||
a huge value to allow the kernel to reduce CPU wakeups */
|
a huge value to allow the kernel to reduce CPU wakeups */
|
||||||
SetThreadTimerSlackMS(100);
|
SetThreadTimerSlackMS(100);
|
||||||
|
|
||||||
|
#ifdef ENABLE_SYSTEMD_DAEMON
|
||||||
|
sd_notify(0, "READY=1");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* run the main loop */
|
/* run the main loop */
|
||||||
instance->event_loop->Run();
|
instance->event_loop->Run();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user