mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibCore: Create Core::SessionManagement for session management
This commit is contained in:
parent
76c67b7ae9
commit
2c3caa7e17
3 changed files with 89 additions and 0 deletions
20
Userland/Libraries/LibCore/SessionManagement.h
Normal file
20
Userland/Libraries/LibCore/SessionManagement.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Peter Elliott <pelliott@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Core::SessionManagement {
|
||||
|
||||
ErrorOr<pid_t> root_session_id(Optional<pid_t> force_sid = {});
|
||||
ErrorOr<void> logout(Optional<pid_t> force_sid = {});
|
||||
|
||||
ErrorOr<String> parse_path_with_sid(StringView general_path, Optional<pid_t> force_sid = {});
|
||||
ErrorOr<void> create_session_temporary_directory_if_needed(uid_t uid, gid_t gid, Optional<pid_t> force_sid = {});
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue