From 9ac8450e7f0a011654e947e996b0df5631e68c23 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 29 May 2024 21:04:13 +0200 Subject: [PATCH] basic: Add debug logging for pidref_set_pid() --- src/basic/pidref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }