mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 18:55:40 +03:00
manager: use sd_notify() to notify parent systemd that we have finished startup
This commit is contained in:
parent
3b8bdddeff
commit
530345e782
@ -546,7 +546,8 @@ libsystemd_core_la_SOURCES = \
|
|||||||
src/tcpwrap.c \
|
src/tcpwrap.c \
|
||||||
src/cgroup-util.c \
|
src/cgroup-util.c \
|
||||||
src/condition.c \
|
src/condition.c \
|
||||||
src/dbus-common.c
|
src/dbus-common.c \
|
||||||
|
src/sd-daemon.c
|
||||||
|
|
||||||
libsystemd_core_la_CFLAGS = \
|
libsystemd_core_la_CFLAGS = \
|
||||||
$(AM_CFLAGS) \
|
$(AM_CFLAGS) \
|
||||||
|
@ -58,6 +58,7 @@
|
|||||||
#include "special.h"
|
#include "special.h"
|
||||||
#include "bus-errors.h"
|
#include "bus-errors.h"
|
||||||
#include "exit-status.h"
|
#include "exit-status.h"
|
||||||
|
#include "sd-daemon.h"
|
||||||
|
|
||||||
/* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
|
/* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
|
||||||
#define GC_QUEUE_ENTRIES_MAX 16
|
#define GC_QUEUE_ENTRIES_MAX 16
|
||||||
@ -2944,6 +2945,10 @@ void manager_check_finished(Manager *m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bus_broadcast_finished(m, kernel_usec, initrd_usec, userspace_usec, total_usec);
|
bus_broadcast_finished(m, kernel_usec, initrd_usec, userspace_usec, total_usec);
|
||||||
|
|
||||||
|
sd_notifyf(false,
|
||||||
|
"READY=1\nSTATUS=Startup finished in %s.",
|
||||||
|
format_timespan(sum, sizeof(sum), total_usec));
|
||||||
}
|
}
|
||||||
|
|
||||||
void manager_run_generators(Manager *m) {
|
void manager_run_generators(Manager *m) {
|
||||||
|
Loading…
Reference in New Issue
Block a user