summaryrefslogtreecommitdiff
path: root/include/uapi/linux/counter
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2026-01-27 22:51:37 +0000
committerChristian Brauner <brauner@kernel.org>2026-02-02 09:52:26 +0100
commitab89060fbc92edd6e852bf0f533f29140afabe0e (patch)
tree64049bd09898db0fbce9d2d6ca8ae0fab42da1d8 /include/uapi/linux/counter
parentb3c78bc53630d14a5770451ede3a30e7052f3b8b (diff)
pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns
Currently it is not possible to distinguish between the case where a process has already exited and the case where a process is in a different namespace, as both return -ESRCH. glibc's pidfd_getpid() procfs-based implementation returns -EREMOTE in the latter, so that distinguishing the two is possible, as the fdinfo in procfs will list '0' as the PID in that case: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/pidfd_getpid.c;h=860829cf07da2267484299ccb02861822c0d07b4;hb=HEAD#l121 Change the error code so that the kernel also returns -EREMOTE in that case. Fixes: 7477d7dce48a ("pidfs: allow to retrieve exit information") Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com> Link: https://patch.msgid.link/20260127225209.2293342-1-luca.boccassi@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/uapi/linux/counter')
0 files changed, 0 insertions, 0 deletions