NAME
Process::SubProcess - Library to manage Sub Processes as Objects
DESCRIPTION
Process::SubProcess implements a Class to manage a Sub Process and read its Output and Errors
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. This allows an easy aggregation and thus the creation of Sub Process Groups and Sub Process Pools for simultaneous execution of multiple Sub Processes while keeping the execution logs separated.
STATIC METHODS
- runSubProcess ( [ COMMAND | OPTIONS ] )
-
This creates adhoc an
Process::SubProcessObject and runs the command given as string.COMMANDa single scalar parameter will be interpreted as command to execute without any additional options.OPTIONSare passed in a hash like fashion, using key and value pairs. Combining the command with additionalOPTIONSalso requires theCOMMANDto be part of the hash.
CONSTRUCTOR
- new ( [ CONFIGURATIONS ] )
-
This is the constructor for a new SubProcess.
CONFIGURATIONSare passed in a hash like fashion, using key and value pairs.
Administration Methods
- setArrProcess ( CONFIGURATIONS )
-
This Method will asign Values to physically Data Fields.
CONFIGURATIONSis a list are passed in a hash like fashion, using key and value pairs.Recognized Configurations:
command- The command that has to be executed. It only can be set if the process is not running yettimeout- Time in seconds to wait for the process to finish. After this time the process will be terminatedcheck | 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.