From a12a4bdc9a18031695cdb04855f4451039f05feb Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Fri, 20 Feb 2026 00:14:19 +0100 Subject: [PATCH] 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. --- src/basic/pidref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/pidref.c b/src/basic/pidref.c index 3c41e2a41e..10ff9a63b1 100644 --- a/src/basic/pidref.c +++ b/src/basic/pidref.c @@ -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)