From: Lennart Poettering Date: Tue, 16 Oct 2018 11:47:23 +0000 (+0200) Subject: core: log about unit_watch_pid() failing X-Git-Tag: v240~544^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdc2af3e150bb9d7ecacbeca590ff8b3302aa2b8;p=thirdparty%2Fsystemd.git core: log about unit_watch_pid() failing CID 1237509 --- 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; } }