|
Hermes 0.7.0
Linux game streaming host
|
Whether a process belongs to an isolated session. More...
#include <optional>#include <sys/types.h>Go to the source code of this file.
Functions | |
| template<class MountNs, class Parent> | |
| bool | platf::session_devices::belongs_to_session (pid_t pid, ino_t ns, MountNs mount_ns, Parent parent) |
Whether a process belongs to an isolated session.
Definition in file session_lineage.h.
| bool platf::session_devices::belongs_to_session | ( | pid_t | pid, |
| ino_t | ns, | ||
| MountNs | mount_ns, | ||
| Parent | parent ) |
Whether pid belongs to the session whose mount namespace is ns: it runs in that namespace, or descends from a process that does.
Sessions start containers of their own: the Steam client runs in its runtime's mount namespace, and games in Proton's, so a namespace match alone misses the Steam that makes the session's Steam Input pads. A host process never descends from a session's: an orphan is re-parented to init or the user's systemd, both on the host, and the walk stops there.
| mount_ns | The mount namespace inode of a pid, or nothing if gone. |
| parent | The parent pid of a pid, or nothing if gone. |
Definition at line 26 of file session_lineage.h.