Parallel::Forker::Process - Single parallel fork process object
$obj->run; $obj->poll; $obj->kill(<"SIGNAL">); $obj->kill_tree(<"SIGNAL">);
Manage a single process under the control of Parallel::Forker.
Processes are created by calling a Parallel::Forker object's schedule method, and retrieved by various methods in that class.
Processes transition over 6 states. They begin in idle state, and are transitioned by the user into ready state. As their dependencies complete, Parallel::Forker transitions them to the runable state. As the Parallel::Forker object's
max_proc limit permits, they transition to the running state, and get executed. On completion, they transition to the done state. If a process depends on another process, and that other process fails, the dependant process transitions to the parerr (parent error) state, and is never run.
Return the parent Parallel::Forker object this process belongs to.
Returns true if the process is in the done state.
Returns true if the process is in the idle state.
Returns true if the process is in the parent error state.
Returns true if the process is in the ready state.
Returns true if the process is reapable (->reap may be called on it).
Returns true if the process is in the runable state.
Returns true if the process is in the running state.
Send the specified signal to the process if it is running. If no signal is specified, send a SIGKILL (9).
Send the specified signal to the process (and its subchildren) if it is running. If no signal is specified, send a SIGKILL (9).
Send a signal to this child (and its subchildren) if it is running. If no signal is specified, send a SIGKILL (9).
Return the label of the process, if any, else undef.
Return the name of the process.
Return the process ID if this job is running, else undef.
Check the process for activity, invoking callbacks if needed. Generally Parallel::Forker's object method
poll()is used instead.
Mark this process as being ready for execution when all
run_after's are ready and CPU resources permit. When that occurs, run will be called on the process automatically.
When the process has no other processes waiting for it, and the process is is_done or is_parerr, remove the data structures for it. This reclaims memory for when a large number of processes are being created, run, and destroyed.
Unconditionally move the process to the "running" state and start it.
Add a new (or list of) processes that must be completed before this process can be runnable. You may pass a process object (from schedule), a process name, or a process label. You may use "|" or "&" in a string to run this process after ANY processes exit, or after ALL exit (the default.) ! in front of a process name indicates to run if that process fails with bad exit status. ^ in front of a process indicates to run if that process succeeds OR fails.
Returns the name of the current state, 'idle', 'ready', 'runable', 'running', 'done' or 'parerr'. For forward compatibility, use the is_idle etc. methods instead of comparing this accessor's value to a constant string.
Return the exit status of this process if it has completed. The exit status will only be correct if a CHLD signal handler is installed, otherwise it may be undef.
Return true if the exit status of this process was zero. Return false if not ok, or if the status has not been determined, or if the status was undef.
The latest version is available from CPAN and from http://www.veripool.org/.
Copyright 2002-2019 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
Wilson Snyder <email@example.com>