Description Usage Arguments Value Warning Author(s) See Also
children
returns currently active children
readChild
reads data from a given child process
selectChildren
checks children for available data
readChildren
checks children for available data and reads
from the first child that has available data
sendChildStdin
sends string (or data) to child's standard input
kill
sends a signal to a child process
1 2 3 4 5 6 | children(select)
readChild(child)
readChildren(timeout = 0)
selectChildren(children = NULL, timeout = 0)
sendChildStdin(child, what)
kill(process, signal = SIGINT)
|
select |
if omitted, all active children are returned, otherwise
|
child |
child process (object of the class |
timeout |
timeout (in seconds, fractions supported) to wait before giving up. Negative numbers mean wait indefinitely (strongly discouraged as it blocks R and may be removed in the future). |
children |
list of child processes or a single child process
object or a vector of process IDs or |
what |
character or raw vector. In the former case elements are collapsed using the newline chracter. (But no trailing newline is added at the end!) |
process |
process (object of the class |
signal |
signal to send (one of |
children
returns a list of child processes (or an empty list)
readChild
and readChildren
return a raw vector with a
"pid"
attribute if data were available, integer vector of
length one with the process ID if a child terminated or NULL
if the child no longer exists (no children at all for
readChildren
).
selectChildren
returns TRUE
is the timeout was reached,
FALSE
if an error occurred (e.g. if the master process was
interrupted) or an integer vector of process IDs with children that
have data available.
sendChildStdin
sends given content to the standard input
(stdin) of the child process. Note that if the master session was
interactive, it will also be echoed on the standard output of the
master process (unless disabled). The function is vector-compatible,
so you can specify more than one child as a list or a vector of
process IDs.
kill
returns TRUE
.
This is a very low-level API for expert use only. If you are
interested in user-level parallel execution use
mclapply
, parallel
and friends instead.
Simon Urbanek
fork
, sendMaster
,
parallel
, mclapply
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.