Programmer Reference : UNIX inter-process communication
UNIX inter-process communication
UNIX operating systems provide each process with an environment consisting of variable names paired with values. This chapter contains the protocol specification for accessing the processes and environment variables of the host operating system. These environment variables can be used by the process to determine the user's configuration. Information such as search path, home directory, and user name can be retrieved from the environment. With access to these environment variables, a Smalltalk application can query the values and configure itself appropriately.
The following classes are provided: UNIXEnvironment, UNIXProcess, UNIXReadPipeStream, and UNIXWritePipeStream.
The UNIXEnvironment class is used by the UNIXProcess class to provide an environment for new processes.
The UNIXProcess class controls other operating system processes from within Smalltalk. The UNIXProcess class supports both interactive and passive processes. Interactive processes support stream-based pipes for stdin, stdout, and stderr. Stream-based pipes enable the developer to control the process (input) and record the resulting output. For example, UNIX shell scripts can be invoked from within a Smalltalk application.
The UNIXReadPipeStream and UNIXWritePipeStream classes support a subset of the stream protocol. Instances of UNIXReadPipeStream are answered by a UNIXProcess for stdout and stderr streams, and instances of UNIXWritePipeStream are answered for input streams.
Last modified date: 01/29/2015