Next: , Previous: , Up: Processes   [Contents][Index]


5.27.5 Process States

Each process object has a state associated with it; this depends on the status of the subprocess currently running on the process object (or not as the case may be).

The possible states are,

running

This state means that the subprocess using this process object is currently running, i.e. it hasn’t been stopped.

stopped

Means that the subprocess has been temporarily suspended from running.

unused

This means that the process object is free to have a new subprocess created on it.

Predicates exist which test whether a given process object is in one of these states.

Function: process-running-p process-object

Returns true when process-object is in the running state.

Function: process-stopped-p process-object

Returns true when process-object is in the stopped state.

Function: process-in-use-p process-object

Returns true when process-object is not in the unused state.

The following two functions are used to stop and then subsequently continue a process running.

Function: stop-process process-object #!optional whole-group

This function suspends execution of the subprocess running on the process object process-object.

If whole-group is true all subprocesses in the process group of process-object are stopped.

Function: continue-process process-object #!optional whole-group

Use this function to continue a subprocess executing after it has been stopped (by the stop-process function).

If whole-group is true all subprocesses in the process group of process-object are continued.

The state change function component of a process object defines a function which will be called each time the state of the process object changes. If your program needs to be informed when an asynchronous process terminates this function is the way to do it.

Function: process-function process

Returns the value of the state change function component of the process object process.

Function: set-process-function process function

Sets the value of the state change function component of the process object process to the function function, then returns function.


Next: , Previous: , Up: Processes   [Contents][Index]