Files
ladybird/Libraries/LibWebView/ProcessManager.cpp
Andreas Kling 24afab20cc LibWebView: Defer process cleanup to avoid signal handler deadlock
When a child process exits, the SIGCHLD handler was destroying the
Process object synchronously within the signal dispatch context. This
triggered Process::~Process() which called m_connection->shutdown(),
attempting to join the IPC IO thread.

Joining threads from within signal handler context can cause deadlocks,
as observed when WebContent crashes during test-web runs.

Fix this by deferring the on_process_exited callback using
Core::deferred_invoke(), ensuring the Process destruction happens in
normal event loop context.
2026-01-13 21:05:58 +01:00

4.8 KiB