Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
session_lineage.h File Reference

Whether a process belongs to an isolated session. More...

#include <optional>
#include <sys/types.h>
Include dependency graph for session_lineage.h:
This graph shows which files directly or indirectly include this file:

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)

Detailed Description

Whether a process belongs to an isolated session.

Definition in file session_lineage.h.

Function Documentation

◆ belongs_to_session()

template<class MountNs, class Parent>
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.

Parameters
mount_nsThe mount namespace inode of a pid, or nothing if gone.
parentThe parent pid of a pid, or nothing if gone.

Definition at line 26 of file session_lineage.h.