LibCore: Use the user's root session ID for standard runtime path
This ensures processes created by the user use the same runtime path.
This commit is contained in:
parent
e2566d5126
commit
701e77019c
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/701e77019c Pull-request: https://github.com/SerenityOS/serenity/pull/16507
1 changed files with 2 additions and 2 deletions
|
@ -8,8 +8,8 @@
|
|||
#include <AK/LexicalPath.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/SessionManagement.h>
|
||||
#include <LibCore/StandardPaths.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <pwd.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -92,7 +92,7 @@ ErrorOr<DeprecatedString> StandardPaths::runtime_directory()
|
|||
StringBuilder builder;
|
||||
|
||||
#if defined(AK_OS_SERENITY)
|
||||
auto sid = TRY(Core::System::getsid());
|
||||
auto sid = TRY(Core::SessionManagement::root_session_id());
|
||||
builder.appendff("/tmp/session/{}", sid);
|
||||
#elif defined(AK_OS_MACOS)
|
||||
builder.append(home_directory());
|
||||
|
|
Loading…
Add table
Reference in a new issue