pidref: do not tamper with pidref_acquire_pidfd_id() retval

If a pidfd id is passed to us, it must have originated from
somewhere, i.e. pidfs should be supported on the system.
Hence let's be honest about -EOPNOTSUPP, which might indicate
some bigger problems under the hood, rather than allowing
it to be turned into mild -ESRCH.
This commit is contained in:
Mike Yuan
2026-03-02 15:25:53 +09:00
committed by Yu Watanabe
parent 8d720dea86
commit a12a4bdc9a
+1 -1
View File
@@ -137,7 +137,7 @@ int pidref_set_pid_and_pidfd_id(
if (pidfd_id > 0) {
r = pidref_acquire_pidfd_id(&n);
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r))
if (r < 0)
return r;
if (n.fd_id != pidfd_id)