This subsection describes a conceptual model of the UNIX process.
The C language process model is used by the UNIXProcess class. Each process is defined as having an input stream (stdin), an output stream (stdout), and an error stream (stderr). The streams made available by a UNIXProcess are defined when they are created.
There are three stages in the life of a UNIXProcess:
Through the UNIXProcess class, operating system processes can be controlled from within Smalltalk.
Three file descriptors, stdin, stdout, and stderr, are available through the C language. Direct access to these file descriptors is possible for each instance of the UNIXProcess class. While directly accessing the file descriptors is possible, a stream-based abstraction is the preferred method of interaction.
An instance of the UNIXWritePipeStream class is used to access stdin while instances of UNIXReadPipeStream are used to access stdout and stderr. The UNIXWritePipeStream class and UNIXReadPipeStream class (described in the section entitled UNIX pipe stream) support a subset of the stream protocol. An instance of UNIXProcess responds to the messages stdin, stdout, and stderr by answering a UNIXPipeStream associated with the operating system's stdin, stdout or stderr pipe, respectively. If there is no corresponding UNIX pipe (if it was not requested when the UNIXProcess was created), then nil is answered.