"psexec"
Don Hopkins

The purpose of "psexec" is to execute a program, connecting its standard
input and output to a PostScript process in the NeWS server. 

usage: psexec [-s service] program [arg ...]

The service, which defaults to the program name, "psexec", names a
PostScript function. A connection to the NeWS server is made, and
attached to the stdin, stdout, and stderr files. The service
name is sent to the NeWS server, invoking a PostScript function
defined in systemdict. This starts up a light weight PostScript
process in the NeWS server, whose stdin and stdout are
connected, through a socket, to the stdin and stdout of the
psexec client process. Now psexec executes the program, passing any
arguments on to it. This results in the psexec client process being replaced
by the named program, stdin and stdout coupled with the NeWS process.

The "psexec" service will pop up a terminal window (assuming
you have loaded "term.ps") Characters typed into the terminal window
are directed to the client process's input. Output from the client
process is displayed in the terminal window, which emulates a VT100.

This is a useful utility for making front ends for command line driven
programs, without event loops. The PostScript service process sends
commands to the client process's stdin. The client can use
ps_open_PostScript() to open another connection to the NeWS server,
and perform synchronous cps function calls, without having to test for
all possible tagged input events that the NeWS server might send (like
in an event loop). 
