Spawn:
PROC [cmd, stdin, stdout, stderr: CHARPtr]
RETURNS [
INT];
fork a (Unix) process to run cmd, attaching its standard input, output and error file descriptors to the files named by stdin, stdout, stderr. n.b. the files may be named pipes.
The returned value is the exit status of the spawned process or -1 for failure.
CDSpawn:
PROC [cmd, wd, stdin, stdout, stderr: CHARPtr]
RETURNS [
INT];
fork a (Unix) process to run cmd in working directory wd, attaching its standard input, output and error file descriptors to the files named by stdin, stdout, stderr. n.b. the files may be named pipes.
The returned value is the exit status of the spawned process or -1 for failure.
PPOpen:
PROC [cmd: CHARPtr]
RETURNS [
FD];
Fork off a Unix(tm) process running cmd.
Return a fildes connected to the cmd's stdin/stdout, or FD.error on failure.
RExec2:
PROC [host: SockAddrPtr, port: CARD, user: CHARPtr, passwd: CHARPtr, cmd: CHARPtr, errbuf: CHARPtr, errbufbytes:
INT ¬ 0]
RETURNS [
FD];
UnixTM remote exec protocol.
If host = NIL, use localhost.
If host does not specify a port, and the port argument is nonzero, use it.
If connection to remote host fails, return error with code available using UnixErrno.GetErrno
Use the user and passwd arguments to authenticate to remote host.
If authentication fails,
return error with errno == ENOEXEC and store error message in *errbuf.
Execute cmd on remote host.
If command initiation fails
return error with errno == ENOEXEC and store error message in *errbuf.
If command initiation succeeds
return fildes connected cmd's stdin/stdout.
It is permissible to pass errbuf == NIL, in which case error output is discarded.