NAME

Linux::Event::Signal - signalfd adaptor for Linux::Event::Loop

SYNOPSIS

use v5.36;
use Linux::Event;

my $loop = Linux::Event->new;

# Subscribe via the loop convenience method:

my $sub = $loop->signal('INT', sub ($loop, $sig, $count, $data) {
  $loop->stop;
});

DESCRIPTION

Linux::Event::Signal adapts signalfd-style signal delivery into the loop. Most users access it through $loop->signal(...) rather than constructing it directly.

Signal subscriptions are loop primitives. They are not a general-purpose signal framework.

CALLBACK ABI

Signal callbacks receive four arguments:

$cb->($loop, $signal_name, $count, $data)

$count is the number of queued deliveries drained in the current dispatch.

SUBSCRIPTIONS

The returned subscription object supports cancel.

SEE ALSO

Linux::Event::Loop