next up previous index
Next: Process control Up: Creating Communicating Processes Previous: Creating Communicating Processes

Process creation

        The built-ins of the exec group and sh/1 fork a new process and execute the command given as the first argument. Sorted by their versatility, there are:

  With sh/1 (or its synonym system/1) it is possible to call and execute any UNIX command from withing ECLiPSe . However it is not possible to communicate with the process. Moreover, the ECLiPSe process just waits until the command has been executed.

The exec group makes it possible to set up communication links with the child process by specifying the Streams argument. It is a list of the form

[Stdin, Stdout, Stderr]
and specifies which ECLiPSe stream should be connected to the stdin, stdout or stderr of the child respectively. Unless null is specified, this will establish pipes to be created between the ECLiPSe process and the child. On Berkeley UNIX systems the streams can be specified as sigio(Stream) which will setup the pipe such that the signal sigio is issued every time new data appears on the pipe. Thus, by defining a suitable interrupt handler, it is possible to service this stream in a completely asynchronous way.



next up previous index
Next: Process control Up: Creating Communicating Processes Previous: Creating Communicating Processes



Micha Meier
Mon Mar 4 12:11:45 MET 1996