Skip to main content

own_view_pid

Function own_view_pid 

Source
pub fn own_view_pid(pid: u32) -> u32
Expand description

The PID a process sees for itself, which is what a renderer reports.

On Linux, Chromium’s namespace sandbox runs renderers in a PID namespace of their own, where getpid() is a small number (2, 3, …) unrelated to the host PID this backend lists. The kernel records every level in /proc/<pid>/status (NSpid: <host> … <innermost>), so a renderer row is looked up by the innermost one. AgentMux’s renderers share one namespace per instance, and only this instance’s processes are looked up, so the number is unique among them. Elsewhere there is no namespace: the PID.