startui: Remove /tmp/launch.sock as root
All checks were successful
Build and test / build (push) Successful in 1m51s
All checks were successful
Build and test / build (push) Successful in 1m51s
Fixes #47. This avoids permission errors.
This commit is contained in:
parent
bb6759986e
commit
e7d361ca51
@ -95,6 +95,8 @@ Result<int> luna_main(int argc, char** argv)
|
||||
setsid();
|
||||
|
||||
// First of all, start the display server, in case we haven't been started by loginui.
|
||||
// FIXME: What if we're started after a wind process has previously run but exited, so we think there's a wind
|
||||
// process when there isn't.
|
||||
if (!os::FileSystem::exists("/tmp/wind.sock"))
|
||||
{
|
||||
// We need to wait for this one, since its sockets are required later.
|
||||
@ -121,6 +123,7 @@ Result<int> luna_main(int argc, char** argv)
|
||||
// We also need to wait for this one, since taskbar requires launch.sock.
|
||||
bool success = os::IPC::Notifier::run_and_wait(
|
||||
[&] {
|
||||
(void)os::FileSystem::remove("/tmp/launch.sock");
|
||||
StringView launch_command[] = { "/usr/bin/launch" };
|
||||
spawn_process_as_user(Slice<StringView>(launch_command, 1), pw->pw_uid, pw->pw_gid, groups.slice());
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user