Description Usage Arguments Format Details Value
process_read()
reads data from one of the child process' streams,
standard output or standard error output, and returns it as a
character
vector.
process_write()
writes data into child's
standard input stream.
process_close_input()
closes the write end
of the pipe whose read end is the standard input stream of the
child process. This is a standard way to gracefully request the child
process to exit.
PIPE_STDOUT
: read from child's standard output.
PIPE_STDERR
: read from child's standard error
output.
PIPE_BOTH
: read from both child's output streams:
standard output and standard error output.
1 2 3 4 5 6 7 8 9 10 11 12 | process_read(handle, pipe = PIPE_BOTH, timeout = TIMEOUT_IMMEDIATE,
flush = TRUE)
process_write(handle, message)
process_close_input(handle)
PIPE_STDOUT
PIPE_STDERR
PIPE_BOTH
|
handle |
Process handle obtained from |
pipe |
Output stream identifier: |
timeout |
Optional timeout in milliseconds. |
flush |
If there is any data within the given |
message |
Input for the child process. |
PIPE_STDOUT
, PIPE_STDERR
and PIPE_BOTH
are single
character
values.
If flush=TRUE
in process_read()
then the invocation of the
underlying read()
system-call will be repeated until the pipe
buffer is empty.
If pipe
is set to either PIPE_STDOUT
or PIPE_STDERR
, the returned
value is a single list with a single key, stdout
or stderr
,
respectively. If pipe
is set to PIPE_BOTH
the returned list
contains both keys. Values in the list are character
vectors of 0
or more elements, lines read from the respective output stream of the
child process.
For details on timeout
see terminating.
process_read
returns a list
which contains either of or
both keys: stdout and stderr; the value is in both cases
a character
vector which contains lines of child's output.
process_write
returns the number of characters written.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.