NAME
Process::SubProcess::Group - Module to manage and run multiple Sub Processes at once
DESCRIPTION
Process::SubProcess::Group implements a class to manage multiple Sub Process and run them at once while keeping their Output and Errors related to each command.
The Idea of this API is to launch Sub Processes and keep track of all Output on STDOUT, STDERR, the EXIT CODE and possible System Errors at Launch Time in an object oriented manner.
METHODS
Constructor
- new ( [ CONFIGURATIONS ] )
 - 
This is the constructor for a new SubProcess.
Parameters:
CONFIGURATIONSare passed in a hash like fashion, using key and value pairs.Recognized Configurations:
check- Time in seconds when to check a process for new output. This is calculated based on the count of processes to manage.read | readtimeout- Time in seconds to wait for the process output. If the process is expected to run longer it is useful to set it to avoid excessive checks. It is also important for multiple process execusions, because other processes will not be checked before the read has not timed out.timeout- Time in seconds to wait for the process to finish. After this time the process will be terminateddebug- show internal processing informationquiet- do not print any warnings or errors 
Administration Methods
- add ( [ OBJECT | CLASS ] )
 - 
This method adds a Process object to the list of managed processes.
Parameters:
OBJECT | CLASS- is aProcess::SubProcessobject or a compatible class name. If a class name or no parameter is given a new object will be created.Returns: It returns the object that was addded to list. If an object was given the same will be returned.
 
- setCheckInterval ( INTERVAL )
 - 
This method calculates the
READTIMEOUTfor eachProcess::SubProcessobject according to the amount of existing objects. The value of theREADTIMEOUTfor each Process will be rounded to a whole number.Example:
The Process Group manages 3 Processes. Processes "A", "B" and "C". Process "A" should be checked every 6 seconds. So, setting
setCheckInterval(6)will set theREADTIMEOUTof Processes "A", "B" and "C" to 2 seconds. This way after cycling over the processes the Process "A" will be checked again after 6 seconds.Parameters:
INTERVAL- is an integer that specifies the interval in which all processes should be checked once. 
- setReadTimeout ( TIMEOUT )
 - 
This method set the
READTIMEOUTfor eachProcess::SubProcessobject.Parameters:
TIMEOUT- is an integer that specifies the time in seconds to wait for output from the command for eachProcess::SubProcessobject. 
- setTimeout ( TIMEOUT )
 - 
This method set the
EXECUTIONTIMEOUTfor theProcess::SubProcess::Groupobject.This enables the EXECUTIONTIMEOUT functionality in the
Wait()method which ensures that no process runs longer than required. TheWait()method will call theTerminate()method which will call theTerminate()method on eachProcess::SubProcessthat is still running.Parameters:
TIMEOUT- is an integer that specifies the maximal execution time in seconds of the whole Process Group execution.See Method
Wait() 
- Wait ( [ CONFIGURATIONS ] )
 - 
This method checks the
Process::SubProcessobjects regularly and continues until allProcess::SubProcessobjects report that they are notRUNNINGanymore.If the EXECUTIONTIMEOUT functionality is enabled the method will call the
Terminate()method which then calls theTerminate()method on eachProcess::SubProcessthat is still running.Parameters:
CONFIGURATIONS- is a list are passed in a hash like fashion, using key and value pairs.Recognized Configurations:
check- is an integer that specifies the interval in which all processes should be checked once.read | readtimeout- is an integer that specifies the time in seconds to wait for output from the command for eachProcess::SubProcessobject.timeout- is an integer that specifies the maximal execution time in seconds of the whole Process Group execution.