1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
MODULE: GSL/process management
package
Class: Process
Function: proc . new (command,[workdir],[inname],[outname],[errname])
Creates a process object. The command is a native system command. Does
not execute the command.
The `command` argument names a file to execute along with possible arguments.
The command will be searched for in the directories specified by the
PATH environment variable.
If `workdir` is provided, a chdir will be performed before the process is run.
If `inname`, `outname`, `errname` are provided,
the stdin, stdout, and stderr for the process will be
respectively redirected to the named files.
Returns the process object.
Class: Process handle
Function: <proc handle> . setenv (name,[value])
Sets an environment variable for the process. Can only be called before
the process is started with proc_handle.run ()
Function: <proc handle> . getenv (name)
Gets an environment variable from the process.
Can only be called before the process is started with proc_handle.run ()
Function: <proc handle> . run ([error])
Runs a process created with proc.new ()
Returns -1 if there was an error creating the object.
Also places an error message into the parameter error.
|