Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine
Ulm's Modula-2 Library:
PipeIO
NAME
PipeIO - 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: borchert, last change: 1997/02/25, revision: 1.2, converted to HTML: 1997/04/28
Modula-2 ||
Compiler & Tools ||
Library ||
Search Engine