mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibCore: Add 'notify_forked()' to tear down the eventloop in forked child
This makes the forked process capable of constructing a new event loop, should it choose to.
This commit is contained in:
committed by
Andreas Kling
parent
aa2df9277d
commit
c3dbe77024
@@ -81,6 +81,13 @@ public:
|
||||
static int register_signal(int signo, Function<void(int)> handler);
|
||||
static void unregister_signal(int handler_id);
|
||||
|
||||
// Note: Boost uses Parent/Child/Prepare, but we don't really have anything
|
||||
// interesting to do in the parent or before forking.
|
||||
enum class ForkEvent {
|
||||
Child,
|
||||
};
|
||||
static void notify_forked(ForkEvent);
|
||||
|
||||
private:
|
||||
bool start_rpc_server();
|
||||
void wait_for_event(WaitMode);
|
||||
@@ -102,8 +109,8 @@ private:
|
||||
|
||||
class SignalHandlers {
|
||||
AK_MAKE_NONCOPYABLE(SignalHandlers);
|
||||
public:
|
||||
|
||||
public:
|
||||
SignalHandlers(SignalHandlers&& from)
|
||||
: m_signo(from.m_signo)
|
||||
, m_original_handler(from.m_original_handler)
|
||||
|
||||
Reference in New Issue
Block a user