diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 3578929d..1913f262 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -11,7 +11,7 @@ add_subdirectory(libui) add_subdirectory(wind) add_subdirectory(apps) -luna_service(launch.cpp launch) +luna_service(execd.cpp execd) luna_service(run.cpp run) luna_service(loginui.cpp loginui) target_link_libraries(loginui PRIVATE ui) diff --git a/gui/apps/taskbar.cpp b/gui/apps/taskbar.cpp index 7f5e2faf..8084acc7 100644 --- a/gui/apps/taskbar.cpp +++ b/gui/apps/taskbar.cpp @@ -115,7 +115,7 @@ Result luna_main(int, char**) TRY(os::EventLoop::the().register_signal_handler(SIGQUIT, sigquit_handler)); - launcher_client = TRY(os::IPC::Client::connect("/tmp/launch.sock", false)); + launcher_client = TRY(os::IPC::Client::connect("/tmp/execd.sock", false)); ui::Rect screen = app.screen_rect(); diff --git a/gui/launch.cpp b/gui/execd.cpp similarity index 89% rename from gui/launch.cpp rename to gui/execd.cpp index 6dca6415..87441cec 100644 --- a/gui/launch.cpp +++ b/gui/execd.cpp @@ -1,5 +1,5 @@ /** - * @file launch.cpp + * @file execd.cpp * @author apio (cloudapio.eu) * @brief Background process that handles detached launching of apps. * @@ -42,7 +42,7 @@ void handle_ipc_message(os::IPC::ClientConnection& client, u8 id, void*) switch (id) { case os::Launcher::LAUNCH_DETACHED_ID: handle_launch_detached_message(client); break; - default: os::eprintln("launch: Invalid IPC message from client!"); return; + default: os::eprintln("execd: Invalid IPC message from client!"); return; } } @@ -55,11 +55,11 @@ Result luna_main(int argc, char** argv) { TRY(os::Security::pledge("stdio wpath cpath unix proc exec", NULL)); - StringView socket_path = "/tmp/launch.sock"; + StringView socket_path = "/tmp/execd.sock"; os::ArgumentParser parser; parser.add_description("Background process that handles detached launching of apps."_sv); - parser.add_system_program_info("launch"_sv); + parser.add_system_program_info("execd"_sv); parser.parse(argc, argv); signal(SIGCHLD, sigchld_handler); @@ -87,7 +87,7 @@ Result luna_main(int argc, char** argv) if (fds[0].revents & POLLIN) { auto client = TRY(server->accept()); - os::println("launch: New client connected!"); + os::println("execd: New client connected!"); TRY(fds.try_append({ .fd = client.fd(), .events = POLLIN, .revents = 0 })); auto connection = TRY(os::IPC::ClientConnection::adopt_connection(move(client))); @@ -99,7 +99,7 @@ Result luna_main(int argc, char** argv) if (fds[i + 1].revents & POLLIN) clients[i]->check_for_messages(); if (fds[i + 1].revents & POLLHUP) { - os::println("launch: Client %zu disconnected", i); + os::println("execd: Client %zu disconnected", i); fds.remove_at(i + 1); auto client = clients.remove_at(i); client->disconnect(); diff --git a/gui/run.cpp b/gui/run.cpp index 9025a837..bcb3c0f0 100644 --- a/gui/run.cpp +++ b/gui/run.cpp @@ -22,7 +22,7 @@ Result luna_main(int argc, char** argv) parser.add_positional_argument(program, "program", true); parser.parse(argc, argv); - OwnedPtr launcher_client = TRY(os::IPC::Client::connect("/tmp/launch.sock", false)); + OwnedPtr launcher_client = TRY(os::IPC::Client::connect("/tmp/execd.sock", false)); os::println("Requesting to start program '%s'...", program.chars()); diff --git a/system/startui.cpp b/system/startui.cpp index 35307fb6..40de1adc 100644 --- a/system/startui.cpp +++ b/system/startui.cpp @@ -123,17 +123,17 @@ Result luna_main(int argc, char** argv) setenv("HOME", pw->pw_dir, 1); setenv("SHELL", pw->pw_shell, 1); - // We also need to wait for this one, since taskbar requires launch.sock. + // We also need to wait for this one, since taskbar requires execd.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(launch_command, 1), pw->pw_uid, pw->pw_gid, groups.slice()); + (void)os::FileSystem::remove("/tmp/execd.sock"); + StringView execd_command[] = { "/usr/bin/execd" }; + spawn_process_as_user(Slice(execd_command, 1), pw->pw_uid, pw->pw_gid, groups.slice()); }, 1000); if (!success) { - os::eprintln("startui: failed to start launch server, timed out"); + os::eprintln("startui: failed to start execd, timed out"); return 1; } diff --git a/utils/logout.cpp b/utils/logout.cpp index 9e15144e..62c349b0 100644 --- a/utils/logout.cpp +++ b/utils/logout.cpp @@ -21,7 +21,7 @@ Result luna_main(int argc, char** argv) return err(errno); } - if (strstr(ps.ps_name, "/usr/bin/launch")) { kill(ps.ps_pid, SIGTERM); } + if (strstr(ps.ps_name, "/usr/bin/execd")) { kill(ps.ps_pid, SIGTERM); } } return 0;