Zoidberg::Contractor - Module to manage jobs
use Zoidberg::Contractor; my $c = Zoidberg::Contractor->new(); $c->shell_list( [qw(cat ./log)], '|', [qw(grep -i error)] );
Zoidberg inherits from this module, it manages jobs.
It uses Zoidberg::StringParser.
Also it defines Zoidberg::Job and subclasses.
FIXME lots of documentation
Simple constructor, calls
Initialises things like hashes with signal names and sets terminal control. Should be called before usage when the constructor is overloaded.
Recursively calls the
round_up() function of all current jobs.
Executes a list of jobs and logic operators.
Executes a single job.
Checks for jobs that are finished and removes them from the job list.
Returns a job object based on the (numeric) id.
(Note that the job list is un-ordered, so the id and the index are not usually identical.)
Returns a job object based on a string. The following formats are supported:
Returns the signal number for a named signal or undef if no such signal exists.
Jobs are objects of the class
Zoidberg::Job or a subclass of this class.
This object AUTOLOADS methods to process signals. For example:
$job->TERM(); # is identical to $job->kill('TERM');
The job obbjects have the following methods:
Execute the job.
Recursively kill the job, ends all child processes forcefully.
Take terminal control and run this job in the foreground.
Run this job in the background.
Sends $signal (numeric or named) to all child processes belonging to this job; $signal defaults to SIGTERM.
If the boolean $wipe_list is set all jobs pending in the same logic list are removed.
Set local environment for the current job. Can't be set after the job has started.
Set redirections for the current job. Can't be set after the job has started.
Jaap Karssenberg, <firstname.lastname@example.org>
Raoul Zwart, <email@example.com>
Copyright 2003 by Jaap Karssenberg
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.