From cdc2af3e150bb9d7ecacbeca590ff8b3302aa2b8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 16 Oct 2018 13:47:23 +0200 Subject: [PATCH] core: log about unit_watch_pid() failing CID 1237509 --- src/core/service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/service.c b/src/core/service.c index 3d065bf487c..fa2c6996adc 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3648,7 +3648,11 @@ static void service_notify_message( } if (r > 0) { service_set_main_pid(s, new_main_pid); - unit_watch_pid(UNIT(s), new_main_pid); + + r = unit_watch_pid(UNIT(s), new_main_pid); + if (r < 0) + log_unit_warning_errno(UNIT(s), r, "Failed to watch new main PID "PID_FMT" for service: %m", new_main_pid); + notify_dbus = true; } } -- 2.47.3