NAME
Mojo::IOLoop::ReadWriteFork::SIGCHLD - Non-blocking waitpid for Mojolicious
DESCRIPTION
Mojo::IOLoop::ReadWriteFork::SIGCHLD is a module that can wait for a child process to exit. This is currently done either with "child" in EV or a recurring timer and waitpid
.
METHODS
is_waiting
$bool = $sigchld->is_waiting;
Returns true if $sigchld
is still waiting for a process to exit.
singleton
$sigchld = Mojo::IOLoop::ReadWriteFork::SIGCHLD->singleton;
Returns a shared Mojo::IOLoop::ReadWriteFork::SIGCHLD object.
waitpid
$sigchld->waitpid($pid, sub { my ($exit_value) = @_ });
Will call the provided callback with $?
when the $pid
is no longer running.