mirror of
https://github.com/systemd/systemd.git
synced 2025-01-24 06:04:05 +03:00
basic: Add debug logging for pidref_set_pid()
This commit is contained in:
parent
330ecca853
commit
9ac8450e7f
@ -54,7 +54,7 @@ int pidref_set_pid(PidRef *pidref, pid_t pid) {
|
|||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
/* Graceful fallback in case the kernel doesn't support pidfds or is out of fds */
|
/* 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))
|
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;
|
fd = -EBADF;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user