Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine
Ulm's Modula-2 Library:
PipeIO
NAME
PipeIO, Popen, Pclose - initiate I/O to/from a process
SYNOPSIS
FROM StdIO IMPORT FILE, MODE;
PROCEDURE Popen(VAR f: FILE; cmd: ARRAY OF CHAR; mode: MODE;
buffered: BOOLEAN) : BOOLEAN;
PROCEDURE Pclose(f: FILE) : BOOLEAN;
DESCRIPTION
Popen
creates a pipe between the calling process and the command to
be executed.
Cmd
is a string containing a shell command line,
mode
specifies the I/O mode, either
read
for reading or
write
for writing,
buffered
flags if the stream has to be buffered.
The resulting stream pointer will be returned in
f.
A stream opened by
Popen
should be closed by
Pclose, which waits for the associated process
to terminate.
DIAGNOSTICS
Popen
and
Pclose
return
FALSE
on failure.
Edited by: martin, last change: 1996/12/04, revision: 1.1, converted to HTML: 1996/12/11
Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine