mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -8,8 +8,8 @@
|
||||||
#include <AK/LexicalPath.h>
|
#include <AK/LexicalPath.h>
|
||||||
#include <AK/Platform.h>
|
#include <AK/Platform.h>
|
||||||
#include <AK/StringBuilder.h>
|
#include <AK/StringBuilder.h>
|
||||||
|
#include <LibCore/SessionManagement.h>
|
||||||
#include <LibCore/StandardPaths.h>
|
#include <LibCore/StandardPaths.h>
|
||||||
#include <LibCore/System.h>
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -92,7 +92,7 @@ ErrorOr<DeprecatedString> StandardPaths::runtime_directory()
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
|
|
||||||
#if defined(AK_OS_SERENITY)
|
#if defined(AK_OS_SERENITY)
|
||||||
auto sid = TRY(Core::System::getsid());
|
auto sid = TRY(Core::SessionManagement::root_session_id());
|
||||||
builder.appendff("/tmp/session/{}", sid);
|
builder.appendff("/tmp/session/{}", sid);
|
||||||
#elif defined(AK_OS_MACOS)
|
#elif defined(AK_OS_MACOS)
|
||||||
builder.append(home_directory());
|
builder.append(home_directory());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue