Skip to contentSkip to conversation

Documentation: update the description of TracerPid in procfs.rst

PATCH Applied Chen Linxuan 2 participants 2 messages Nov 2, 2022 – Nov 15, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: update the description of TracerPid in procfs.rst

When the tracer of process is outside of current pid namespace, field TracerPid in /proc/<pid>/status will be 0, too, just like this process not have been traced.

This is because that function task_pid_nr_ns used to get the pid of tracer will return 0 in this situation.

---
 Documentation/filesystems/proc.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/filesystems/proc.rst +2 -1
index 898c99eae8e4..e98e0277f05e 100644
@@ -245,7 +245,8 @@ It's slow but very precise.
  Ngid                        NUMA group ID (0 if none)
  Pid                         process id
  PPid                        process id of the parent process
- TracerPid                   PID of process tracing this process (0 if not)
+ TracerPid                   PID of process tracing this process (0 if not, or
+                             the tracer is outside of the current pid namespace)
  Uid                         Real, effective, saved set, and  file system UIDs
  Gid                         Real, effective, saved set, and  file system GIDs
  FDSize                      number of file descriptor slots currently allocated
Signature · 1 line
2.38.1
maintainer Applied
#1 lore raw
Quoted 18 lines · Chen Linxuan

When the tracer of process is outside of current pid namespace, field TracerPid in /proc/<pid>/status will be 0, too, just like this process not have been traced.

This is because that function task_pid_nr_ns used to get the pid of tracer will return 0 in this situation.

---
 Documentation/filesystems/proc.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/filesystems/proc.rst +0 -0
index 898c99eae8e4..e98e0277f05e 100644

Documentation/filesystems/proc.rst It's slow but very precise. · line 249

Quoted 6 lines
Documentation/filesystems/proc.rst +2 -1
@@ -245,7 +245,8 @@ It's slow but very precise.
  Ngid                        NUMA group ID (0 if none)
  Pid                         process id
  PPid                        process id of the parent process
- TracerPid                   PID of process tracing this process (0 if not)
+ TracerPid                   PID of process tracing this process (0 if not, or
+                             the tracer is outside of the current pid namespace)

Applied, thanks.

jon