The EvSignal class

(PECL ev >= 0.2.0)

Einführung

EvSignal watchers will trigger an event when the process receives a specific signal one or more times. Even though signals are very asynchronous, libev will try its best to deliver signals synchronously, i.e. as part of the normal event processing, like any other event.

There is no limit for the number of watchers for the same signal, but only within the same loop, i.e. one can watch for SIGINT in the default loop and for SIGIO in another loop, but it is not allowed to watch for SIGINT in both the default loop and another loop at the same time. At the moment, SIGCHLD is permanently tied to the default loop.

If possible and supported, libev will install its handlers with SA_RESTART (or equivalent) behaviour enabled, so system calls should not be unduly interrupted. In case of a problem with system calls getting interrupted by signals, all the signals can be blocked in an EvCheck watcher and unblocked in a EvPrepare watcher.

Klassenbeschreibung

class EvSignal extends EvWatcher {
/* Eigenschaften */
public $signum;
/* Geerbte Eigenschaften */
public $is_active;
public $data;
public $is_pending;
public $priority;
/* Methoden */
public __construct(
     int $signum ,
     callable $callback ,
     mixed $data = null ,
     int $priority = 0
)
final public static createStopped(
     int $signum ,
     callable $callback ,
     mixed $data = null ,
     int $priority = 0
): EvSignal
public set( int $signum ): void
/* Geerbte Methoden */
public EvWatcher::clear(): int
public EvWatcher::feed( int $revents ): void
public EvWatcher::invoke( int $revents ): void
public EvWatcher::keepalive( bool $value = ?): bool
public EvWatcher::setCallback( callable $callback ): void
public EvWatcher::start(): void
public EvWatcher::stop(): void
}

Eigenschaften

signum

Signal number. See the constants exported by pcntl extension. See also signal(7) man page.

Inhaltsverzeichnis

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

How to celebrate a birthday in Berlin in an unusual way?

How is it organized? Is the route fixed or can you choose your own? I wonder how long the whole trip takes and are there any restrictions? ​

Geschrieben von einermeiner am 31.03.2025 23:47:53
Forum: Apps und PHP Script Gesuche
How to celebrate a birthday in Berlin in an unusual way?

Riding around Berlin with friends, enjoying drinks and fun is a great idea for a holiday or just a nice day out. This format is great for companie ...

Geschrieben von daberty am 31.03.2025 23:46:24
Forum: Apps und PHP Script Gesuche
How to celebrate a birthday in Berlin in an unusual way?

This year I want to do something out of the ordinary, not just sit in a bar. I think to gather friends and make the holiday more active, perhaps w ...

Geschrieben von einermeiner am 31.03.2025 23:38:10
Forum: Apps und PHP Script Gesuche
Google reCAPTCHA in Kontaktformular einbinden

json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret."&response=".$captcha), true) eine gültige Antwor ...

Geschrieben von lauralorde am 31.03.2025 09:08:16
Forum: PHP Developer Forum