Kevin Ryde > chart > App::Chart::Gtk2::Subprocess

Download:
chart-250.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  16
Open  3
View/Report Bugs
Source  

NAME ^

App::Chart::Gtk2::Subprocess -- child process to run jobs

SYNOPSIS ^

 use App::Chart::Gtk2::Subprocess;
 my $subprocess = App::Chart::Gtk2::Subprocess->new;

DESCRIPTION ^

A App::Chart::Gtk2::Subprocess is a child sub-process running chart --subprocess. That subprocess reads tasks from its standard input (in a length-delimited "Storable" format) and prints messages and PerlIO::via::EscStatus status strings to its stdout. The App::Chart::Gtk2::Subprocess sends a App::Chart::Gtk2::Job task to the subprocess then reads its output.

App::Chart::Gtk2::Subprocess notices if the child dies because the output pipe closes. It then waits that child with waitpid. Glib::Child->watch_add is not used because in single thread mode it's implemented with a non-restart sigaction to stop the main loop poll, and it's a bit worrying to think how much third-party library code might not cope gracefully with EINTR.

FUNCTIONS ^

App::Chart::Gtk2::Subprocess->new (key=>value,...)

Create and return a new subprocess. The process is running, but idle.

$subprocess->start_job ($job)

Start a App::Chart::Gtk2::Job on $subprocess. $subprocess must be idle. This is meant for use by App::Chart::Gtk2::JobQueue.

$subprocess->pid()

Return the process ID of $subprocess, or undef if no longer running.

$subprocess->stop()

Forcibly stop the process and any job running in it.

SEE ALSO ^

App::Chart::Gtk2::Job

syntax highlighting: