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
+1 -5
View File
@@ -24,12 +24,8 @@ static int pidfd_check_pidfs(void) {
return have_pidfs;
_cleanup_close_ int fd = pidfd_open(getpid_cached(), 0);
if (fd < 0) {
if (ERRNO_IS_NOT_SUPPORTED(errno))
return (have_pidfs = false);
if (fd < 0)
return -errno;
}
return (have_pidfs = fd_is_fs_type(fd, PID_FS_MAGIC));
}