NAME

Linux::Event::Fork::Exit - Exit-status helper object (abstracts POSIX wait macros)

SYNOPSIS

on_exit => sub ($child, $exit) {
  if ($exit->exited) {
    say "exit code: " . $exit->code;
  } elsif ($exit->signaled) {
    say "signal: " . $exit->signal;
  }
}

DESCRIPTION

Wraps the raw wait status integer and exposes methods so user code does not need to use POSIX macros like WIFEXITED, WEXITSTATUS, WIFSIGNALED, or WTERMSIG.

METHODS

status

Raw wait status integer.

exited / code

Normal exit and exit code (0..255).

signaled / signal

Terminated by signal and signal number.

coredump

True if a core dump occurred (when available on this Perl/platform). If the platform does not provide WCOREDUMP, this method returns false.

AUTHOR

Joshua S. Day (HAX)

LICENSE

Same terms as Perl itself.