Compare commits
No commits in common. "7761a8a41fe2b9b4906024a093a40ef0d54936bf" and "3032415bc0f399e82b3e58072fc04b877ce54ad2" have entirely different histories.
7761a8a41f
...
3032415bc0
@ -19,6 +19,11 @@ static constexpr ui::Color TASKBAR_COLOR = ui::Color::from_rgb(83, 83, 83);
|
|||||||
|
|
||||||
static OwnedPtr<os::IPC::Client> launcher_client;
|
static OwnedPtr<os::IPC::Client> launcher_client;
|
||||||
|
|
||||||
|
void sigchld_handler(int)
|
||||||
|
{
|
||||||
|
wait(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void sigquit_handler(int)
|
void sigquit_handler(int)
|
||||||
{
|
{
|
||||||
// Reload the taskbar by exec-ing the executable, resetting everything.
|
// Reload the taskbar by exec-ing the executable, resetting everything.
|
||||||
@ -113,6 +118,7 @@ Result<int> luna_main(int, char**)
|
|||||||
ui::App app;
|
ui::App app;
|
||||||
TRY(app.init("/tmp/wsys.sock"));
|
TRY(app.init("/tmp/wsys.sock"));
|
||||||
|
|
||||||
|
TRY(os::EventLoop::the().register_signal_handler(SIGCHLD, sigchld_handler));
|
||||||
TRY(os::EventLoop::the().register_signal_handler(SIGQUIT, sigquit_handler));
|
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/launch.sock", false));
|
||||||
|
@ -48,7 +48,7 @@ void handle_ipc_message(os::IPC::ClientConnection& client, u8 id, void*)
|
|||||||
|
|
||||||
void sigchld_handler(int)
|
void sigchld_handler(int)
|
||||||
{
|
{
|
||||||
os::Process::wait(os::Process::ANY_CHILD, nullptr, WNOHANG);
|
os::Process::wait(os::Process::ANY_CHILD, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<int> luna_main(int argc, char** argv)
|
Result<int> luna_main(int argc, char** argv)
|
||||||
|
@ -147,8 +147,11 @@ Result<SharedPtr<VFS::Inode>> Thread::resolve_atfile(int dirfd, const String& pa
|
|||||||
parent->wake_up();
|
parent->wake_up();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (parent->pending_signals.get(SIGCHLD - 1)) kernel_yield();
|
else
|
||||||
parent->send_signal(SIGCHLD);
|
{
|
||||||
|
while (parent->pending_signals.get(SIGCHLD - 1)) kernel_yield();
|
||||||
|
parent->send_signal(SIGCHLD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state = ThreadState::Exited;
|
state = ThreadState::Exited;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user