mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Everywhere: Hand pid of new process to client in launch_server_process()
Allows WebContentClient to get pid of WebContent process right after creation, so there is no window between forking and notify_process_information() IPC response, when client doesn't know the pid.
This commit is contained in:
committed by
Andreas Kling
parent
3110411c60
commit
c46bea479c
@@ -48,6 +48,9 @@ static ErrorOr<NonnullRefPtr<ClientType>> launch_server_process(
|
||||
if (!result.is_error()) {
|
||||
auto process = result.release_value();
|
||||
|
||||
if constexpr (requires { process.client->set_pid(pid_t {}); })
|
||||
process.client->set_pid(process.process.pid());
|
||||
|
||||
if (register_with_process_manager == RegisterWithProcessManager::Yes)
|
||||
WebView::ProcessManager::the().add_process(WebView::process_type_from_name(server_name), process.process.pid());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user