The procbuf class is a GNU extension. It is derived from
streambuf
. A procbuf
can be closed (in which case
it does nothing), or open (in which case it allows communicating
through a pipe with some other program).
procbuf
in a closed state.
If mode is `ios::in', standard output from the program is sent
to a pipe; you can read from the pipe by reading from the
procbuf
. (This is similar to `popen(command, "r")'.)
If mode is `ios::out', output written written to the
procbuf
is written to a pipe; the program is set up to read its
standard input from (the other end of) the pipe. (This is similar to
`popen(command, "w")'.)
The procbuf
must start out in the closed state.
Returns `*this' on success, and `NULL' on failure.
Go to the first, previous, next, last section, table of contents.