Description Usage Arguments Format Details Value See Also
These functions give access to the state of the child process and to its exit status (return code).
The 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
complete.
1 2 3 4 5 6 7 8 9 | process_wait(handle, timeout = TIMEOUT_INFINITE)
process_state(handle)
process_return_code(handle)
TIMEOUT_INFINITE
TIMEOUT_IMMEDIATE
|
handle |
Process handle obtained from |
timeout |
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 waitpid()
or
WaitForSingleObject()
.
process_state()
refreshes the handle by calling
process_wait()
with no timeout and returns one of these
values: "not-started"
. "running"
, "exited"
,
"terminated"
.
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 process_return_code()
.
spawn_process()
, process_read()
signals()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.