mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibWebView: Port to Windows
This commit is contained in:
parent
2abc792938
commit
2dd657f530
Notes:
github-actions[bot]
2025-03-20 02:26:23 +00:00
Author: https://github.com/stasoid
Commit: 2dd657f530
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3002
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
5 changed files with 33 additions and 13 deletions
|
@ -50,6 +50,8 @@ StringView process_name_from_type(ProcessType type)
|
|||
ProcessManager::ProcessManager()
|
||||
: on_process_exited([](Process&&) { })
|
||||
{
|
||||
// FIXME: Handle exiting child processes on Windows
|
||||
#ifndef AK_OS_WINDOWS
|
||||
m_signal_handle = Core::EventLoop::register_signal(SIGCHLD, [this](int) {
|
||||
auto result = Core::System::waitpid(-1, WNOHANG);
|
||||
while (!result.is_error() && result.value().pid > 0) {
|
||||
|
@ -61,6 +63,7 @@ ProcessManager::ProcessManager()
|
|||
result = Core::System::waitpid(-1, WNOHANG);
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
add_process(Process(WebView::ProcessType::Browser, nullptr, Core::Process::current()));
|
||||
|
||||
|
@ -74,7 +77,10 @@ ProcessManager::ProcessManager()
|
|||
|
||||
ProcessManager::~ProcessManager()
|
||||
{
|
||||
// FIXME: Handle exiting child processes on Windows
|
||||
#ifndef AK_OS_WINDOWS
|
||||
Core::EventLoop::unregister_signal(m_signal_handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
Optional<Process&> ProcessManager::find_process(pid_t pid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue