diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 68dc757ce2..009b4baf8b 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -2172,6 +2172,11 @@ void Process::die() m_fds.clear(); m_tty = nullptr; destroy_all_windows(); + + InterruptDisabler disabler; + if (auto* parent_process = Process::from_pid(m_ppid)) { + parent_process->send_signal(SIGCHLD, this); + } } size_t Process::amount_virtual() const diff --git a/Userland/guitest2.cpp b/Userland/guitest2.cpp index 444e0d5a0f..37693fac7f 100644 --- a/Userland/guitest2.cpp +++ b/Userland/guitest2.cpp @@ -16,6 +16,7 @@ #include #include #include +#include class ClockWidget final : public GWidget { public: @@ -69,8 +70,15 @@ static GWindow* make_font_test_window(); static GWindow* make_launcher_window(); static GWindow* make_clock_window(); +void handle_sigchld(int) +{ + dbgprintf("Got SIGCHLD\n"); +} + int main(int argc, char** argv) { + signal(SIGCHLD, handle_sigchld); + GEventLoop loop; #if 0 auto* font_test_window = make_font_test_window();