The EvFork class

(PECL ev >= 0.2.0)

Introduction

Fork watchers are called when a fork() was detected (usually because whoever signalled libev about it by calling EvLoop::fork() ). The invocation is done before the event loop blocks next and before EvCheck watchers are being called, and only in the child after the fork. Note, that if whoever calling EvLoop::fork() calls it in the wrong process, the fork handlers will be invoked, too.

Class synopsis

classEvForkextendsEvWatcher {
public$is_active;
public$data;
public$priority;
public__construct(callable$callback, mixed$data = null, int$priority = 0)
finalpublicstaticcreateStopped(string$callback, string$data = ?, string$priority = ?): object
publicEvWatcher::feed(int$revents): void
publicEvWatcher::invoke(int$revents): void
publicEvWatcher::keepalive(bool$value = ?): bool
}

Table of Contents

To Top