1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-07 21:18:41 +03:00

basic: Add debug logging for pidref_set_pid()

This commit is contained in:
Daan De Meyer 2024-05-29 21:04:13 +02:00
parent 330ecca853
commit 9ac8450e7f

View File

@ -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;
}