bundles / IPython latest / IPython / core / kitty / _proc_ancestor_names
function
IPython.core.kitty:_proc_ancestor_names
source: /IPython/core/kitty.py:40
Signature
def _proc_ancestor_names() → Iterator[str]Summary
Yield ancestor process names, nearest first, by reading /proc.
Extended Summary
Stops early -- yielding nothing further -- if an ancestor's stat file cannot be read, which is what happens when /proc is mounted with hidepid and the ancestor belongs to another user. That is the same outcome as the psutil.AccessDenied the psutil walk below has to handle.
The kernel truncates the name in stat to 15 characters, where psutil would fall back to cmdline to recover the full one. Every terminal this is matched against is well under that, so a truncated name can only ever fail to match -- and only for a process that was never a match.
Aliases
IPython.core.kitty._proc_ancestor_names