App::Chart::Glib::Ex::ChildPid -- object holding child process ID
use App::Chart::Glib::Ex::ChildPid; my $pobj = App::Chart::Glib::Ex::ChildPid->new (pid => $pid); $pobj->kill ('INT'); $pobj->terminate_with_timeout;
A App::Chart::Glib::Ex::ChildPid holds the process ID (an integer) for a child process created by fork or similar spawn.
App::Chart::Glib::Ex::ChildPid
fork
The fork and subprocess emulation described in perlfork doesn't work with Glib process watching (as of Perl-Glib 1.200) and cannot be used with App::Chart::Glib::Ex::ChildPid.
$pobj->kill ()
$pobj->kill ($sig)
Send signal $sig to the $pobj process. $sig defaults to SIGTERM, otherwise it's a string or number per the core kill function (see "kill" in perlfunc).
$sig
$pobj
kill
$pobj->wait ()
$pobj->wait ($flags)
Block and wait for the $pobj process to terminate, as per the core waitpid. The exited signal is also emitted in the usual way if it terminates.
waitpid
exited
pid
The process ID held and operated on. It must be an immediate child of the current process, but can be started by either fork or any of the several Perl fork/spawn/open modules.
kill-on-destroy
If true then when the ChildPid object is destroyed through garbage collection the process is killed and waited if that hasn't already been done.
This is true by default to ensure the child process stops when the parent stops, or when you discard the object as no longer wanted.
exited ($status)
Emitted when the child process exits, either normally or killed by a signal, but not when merely paused by SIGSTOP, SIGTSTP, etc.
This is implemented by a Glib::Child->add_watch (see Glib::MainLoop). Note that function uses SIGCHLD and if you install your own $SIG{'CHLD'} handler then exited won't run.
Glib::Child->add_watch
SIGCHLD
$SIG{'CHLD'}
Glib::MainLoop, IPC::Open3, Proc::SyncExec
To install two_face, copy and paste the appropriate command in to your terminal.
cpanm
cpanm two_face
CPAN shell
perl -MCPAN -e shell install two_face
For more information on module installation, please visit the detailed CPAN module installation guide.