mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
c7ef8530bf
Avoids UB if the PID is read from without otherwise being initialized.
25 lines
475 B
C++
25 lines
475 B
C++
/*
|
|
* Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <LibIPC/Forward.h>
|
|
|
|
namespace WebView {
|
|
|
|
struct ProcessHandle {
|
|
// FIXME: Use mach_port_t on macOS/Hurd and HANDLE on Windows.
|
|
pid_t pid { -1 };
|
|
};
|
|
|
|
}
|
|
|
|
template<>
|
|
ErrorOr<void> IPC::encode(IPC::Encoder&, WebView::ProcessHandle const&);
|
|
|
|
template<>
|
|
ErrorOr<WebView::ProcessHandle> IPC::decode(IPC::Decoder&);
|