AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
exec (String command [, String env1, ..., String envN]) yoix.system
exec (Array command [, String env1, ..., String envN])  
exec (String command , Array envp [, String directory])  
exec (Array command , Array envp [, String directory])  
 
Returns a Process that executes the process described by command, which is either a String or an Array of Strings. The process is run in the context of the optional environment arguments, which can be expressed as a NULL, a number of String arguments or an Array of Strings. Each String should be of the form:
name=value
When the enviroment is specified using an Array or NULL, then a final String argument can be used to specify the directory in which the process is to be executed. The input, output, and error fields in the process returned by exec are streams that can be used to communicate with the process. Data written to the input stream can be read by the process, while output generated by the process can appear on the output or error streams.
 
 Example:   On a UNIX-like system the program,
import yoix.system.*;

Process p = exec("date", "TZ=GMT");
stdout.nextline = p.output.nextline;
prints something like
Tue Aug  8 19:00:13 GMT 2000
on standard output.
 
 Return:   Process
 
 See Also:   Process, waitFor

 

Yoix is a registered trademark of AT&T Inc.