These functions give access to the state of the child process and to its exit status (return code).
timeout parameter can take one of three values:
0 which means no timeout
-1 which means "wait until there is data to read"
a positive integer, which is the actual timeout in milliseconds
TIMEOUT_INFINITE denotes an "infinite" timeout
(that is, wait until response is available) when waiting for an
operation to complete.
TIMEOUT_IMMEDIATE denotes an "immediate" timeout
(in other words, no timeout) when waiting for an operation to
1 2 3 4 5 6 7 8 9
Process handle obtained from
Optional timeout in milliseconds.
An object of class
integer of length 1.
process_wait() checks the state of the child process
by invoking the system call
process_state() refreshes the handle by calling
process_wait() with no timeout and returns one of these
process_return_code() gives access to the value
returned also by
process_wait(). It does not invoke
process_wait() behind the scenes.
process_wait() returns an
integer exit code
of the child process or
NA if the child process has not exited
yet. The same value can be accessed by