mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibCore: Expose register_process and implement for Windows event loop
This is the closest Windows equivalent to integrating process exit handlers into the event loop. Linux could also integrate register_process() into the poll() based Unix event loop via the SYS_pidfd_open syscall; however, macOS requires a kqueue. So for now register_process will only be used by Windows to implement WebView::ProcessMonitor. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
This commit is contained in:
committed by
Alexander Kalenik
parent
433ff624b8
commit
4cb7743915
Notes:
github-actions[bot]
2026-04-12 14:09:25 +00:00
Author: https://github.com/ayeteadoe Commit: https://github.com/LadybirdBrowser/ladybird/commit/4cb7743915b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6909 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/R-Goc
@@ -88,6 +88,10 @@ public:
|
||||
static int register_signal(int signo, ESCAPING Function<void(int)> handler);
|
||||
static void unregister_signal(int handler_id);
|
||||
|
||||
// Invokes the specified handler when the process exits
|
||||
static void register_process(pid_t pid, ESCAPING Function<void(pid_t)> exit_handler);
|
||||
static void unregister_process(pid_t pid);
|
||||
|
||||
static bool is_running();
|
||||
static EventLoop& current();
|
||||
static NonnullRefPtr<WeakEventLoopReference> current_weak();
|
||||
|
||||
Reference in New Issue
Block a user