App::Chart::Proc::ChildPid -- child subprocess pid object
use App::Chart::Proc::ChildPid; my $cp = App::Chart::Proc::ChildPid->new ($pid); $cp->kill_and_wait;
App::Chart::Proc::ChildPid keeps hold of a process ID which is a child of the current process. If the ChildPid object is destroyed the child is killed and waited, thus protecting against creation of zombies.
App::Chart::Proc::ChildPid
App::Chart::Proc::ChildPid->new ($pid)
Create and return a new ChildPid holding process ID $pid. There's no check that $pid is actually a child of the current process.
$pid
$cp->kill ()
$cp->kill ($sig)
Do a kill on the child process, sending it SIGTERM or the given signal $sig (a signal name or number). The return is as per the core kill function, ie. 1 if successful, or 0 if no processes signalled (because the child has been waited).
kill
SIGTERM
$sig
$cp->wait()
Do a wait on the child process and return its exit status. If the child has already been waited the return is -1 with $! set to ECHILD (no such child).
wait
$!
ECHILD
$cp->kill_and_wait()
Do a kill and wait combination on the child process and return its exit status. A SIGTERM is sent first, and if that doesn't kill the process after a few seconds a SIGKILL is sent (which it can't ignore).
SIGKILL
If the child has already been waited the return is -1 with $! set to ECHILD (no such child).
App::Chart::Gtk2::Subprocess
To install App::Chart, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Chart
CPAN shell
perl -MCPAN -e shell install App::Chart
For more information on module installation, please visit the detailed CPAN module installation guide.