tree-wide: drop support for kernels without pidfd_open() and pidfd_send_signal()

Our baseline is v5.4 now.
This commit is contained in:
Mike Yuan
2025-01-12 00:01:07 +01:00
parent a342c71d36
commit 6e14c46bac
6 changed files with 35 additions and 83 deletions
+2 -2
View File
@@ -84,8 +84,8 @@ int pidref_set_pid(PidRef *pidref, pid_t pid) {
fd = pidfd_open(pid, 0);
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))
/* Graceful fallback in case the kernel is out of fds */
if (!ERRNO_IS_RESOURCE(errno))
return log_debug_errno(errno, "Failed to open pidfd for pid " PID_FMT ": %m", pid);
fd = -EBADF;