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:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user