mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWebView+LibCore: Manage process lifecycle using a SIGCHLD handler
This large commit also refactors LibWebView's process handling to use a top-level Application class that uses a new WebView::Process class to encapsulate the IPC-centric nature of each helper process.
This commit is contained in:
committed by
Alexander Kalenik
parent
3dea602d92
commit
4cc3d598f9
25
Userland/Libraries/LibWebView/Process.cpp
Normal file
25
Userland/Libraries/LibWebView/Process.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibCore/Process.h>
|
||||
#include <LibWebView/Process.h>
|
||||
|
||||
namespace WebView {
|
||||
|
||||
Process::Process(ProcessType type, RefPtr<IPC::ConnectionBase> connection, Core::Process process)
|
||||
: m_process(move(process))
|
||||
, m_type(type)
|
||||
, m_connection(move(connection))
|
||||
{
|
||||
}
|
||||
|
||||
Process::~Process()
|
||||
{
|
||||
if (m_connection)
|
||||
m_connection->shutdown();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user