feat: add inherited sessions and desktop session teardown

This commit is contained in:
daniel committed 2026-08-14 10:33:20 +02:00
1 parent f8ded3c30e
commit 0f81276efc
17 files changed
+165

No files matched your search

+7
View File
@@ -86,6 +86,7 @@ namespace Sched {
char environment[EnvironmentBytes]; // NUL-separated NAME=VALUE entries
uint32_t environmentLength;
char user[32]; // Owner user name (inherited from parent on spawn)
int sessionId; // Process-session leader PID (inherited on spawn)
char cwd[256]; // Absolute current working directory
// Thread-local storage. fsBase is loaded into IA32_FS_BASE when
@@ -252,6 +253,12 @@ namespace Sched {
// Returns 0 on success, -1 on failure.
int KillProcess(int pid);
// Start a new process session for the caller, or terminate every process
// belonging to a session. KillSession returns the number of live members
// it signalled; callers can repeat until it returns zero.
int CreateSession();
int KillSession(int sessionId);
// Find a process by PID (returns nullptr if not found or not alive)
Process* GetProcessByPid(int pid);