Go to the first, previous, next, last section, table of contents.


Process Objects

A process object is a type of Lisp object used to provide a link between a `physical' process running in the operating system and Jade's Lisp system. Each process object consists of a number of components (references to other Lisp objects); these components are used when the object is used to run a subprocess.

Process objects which aren't currently being used to run a subprocess store the exit value of the last subprocess which was run on that object.

Function: processp object
This function returns t when its argument is a process object.

The programmer-accessible components of a process object are,

Output stream
A normal Lisp output stream (see section Output Streams), all data which the subprocess outputs to its stdout channel is copied to this output stream. See section Process I/O.
State change function
A Lisp function, called each time the state of the subprocess being run on the object changes. See section Process States.
Program name
The name of the program (a string) to execute when the subprocess is created.
Program arguments
A list of strings defining the arguments which the program executed is given.
Directory
When a subprocess is started its current working directory is set to the directory named by this component of its process object.
Connection type
Asynchronous subprocesses (see section Asynchronous Processes) use this component to decide how to connect to the I/O channels of the subprocess. Current options include pseudo-terminals and pipes.

Function: make-process &optional output-stream state-function directory program args
This functions creates and returns a new process object. No subprocess will be started.

The optional arguments are used to define the values of the components of the new process object, any undefined components will be set to default or null values.

For each component of a process object two functions exist; one to read the component's value in a specific process object, the other to set the component's value.

Function: process-prog process
Returns the value of the program name component of the process object process.

Function: set-process-prog process prog-name
Sets the value of the program name component of the process object process to the string prog-name, then returns prog-name.

Function: process-args process
Returns the value of the program arguments component of the process object process.

Function: set-process-args process arg-list
Sets the value of the program arguments component of the process object process to the list arg-list, then returns arg-list.

Function: process-dir process
Returns the value of the directory component of the process object process.

Function: set-process-directory process directory
Sets the value of the directory component of the process object process to the string directory, then returns directory.


Go to the first, previous, next, last section, table of contents.