summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Sekletar <msekletar@users.noreply.github.com>2016-08-25 08:18:42 +0200
committerLennart Poettering <lennart@poettering.net>2016-08-25 08:18:42 +0200
commit1ef72b55ba6d38f879d7ac9f0237cf8a2b53f0e6 (patch)
treea014113f066cc3ec3947a7dc9185a5e29a22c2d7 /src
parentb74d0fdf79db9b16b217832a052dbdd0e2f48b3d (diff)
udev: inform systemd how many workers we can potentially spawn (#4036)
Diffstat (limited to 'src')
-rw-r--r--src/udev/udevd.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index a893a2b3d9..19f1c29198 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -776,9 +776,9 @@ static void manager_reload(Manager *manager) {
manager->rules = udev_rules_unref(manager->rules);
udev_builtin_exit(manager->udev);
- sd_notify(false,
- "READY=1\n"
- "STATUS=Processing...");
+ sd_notifyf(false,
+ "READY=1\n"
+ "STATUS=Processing with %u children at max", arg_children_max);
}
static void event_queue_start(Manager *manager) {
@@ -1000,6 +1000,10 @@ static int on_ctrl_msg(sd_event_source *s, int fd, uint32_t revents, void *userd
if (i >= 0) {
log_debug("udevd message (SET_MAX_CHILDREN) received, children_max=%i", i);
arg_children_max = i;
+
+ (void) sd_notifyf(false,
+ "READY=1\n"
+ "STATUS=Processing with %u children at max", arg_children_max);
}
if (udev_ctrl_get_ping(ctrl_msg) > 0)
@@ -1627,9 +1631,9 @@ static int run(int fd_ctrl, int fd_uevent, const char *cgroup) {
if (r < 0)
log_error_errno(r, "failed to apply permissions on static device nodes: %m");
- (void) sd_notify(false,
- "READY=1\n"
- "STATUS=Processing...");
+ (void) sd_notifyf(false,
+ "READY=1\n"
+ "STATUS=Processing with %u children at max", arg_children_max);
r = sd_event_loop(manager->event);
if (r < 0) {