From: Daan De Meyer Date: Wed, 29 May 2024 19:04:13 +0000 (+0200) Subject: basic: Add debug logging for pidref_set_pid() X-Git-Tag: v256-rc4~85^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ac8450e7f0a011654e947e996b0df5631e68c23;p=thirdparty%2Fsystemd.git basic: Add debug logging for pidref_set_pid() --- diff --git a/src/basic/pidref.c b/src/basic/pidref.c index ae04dd72a4b..69a010210dd 100644 --- a/src/basic/pidref.c +++ b/src/basic/pidref.c @@ -54,7 +54,7 @@ int pidref_set_pid(PidRef *pidref, pid_t pid) { if (fd < 0) { /* Graceful fallback in case the kernel doesn't support pidfds or is out of fds */ if (!ERRNO_IS_NOT_SUPPORTED(errno) && !ERRNO_IS_PRIVILEGE(errno) && !ERRNO_IS_RESOURCE(errno)) - return -errno; + return log_debug_errno(errno, "Failed to open pidfd for pid " PID_FMT ": %m", pid); fd = -EBADF; }