children              package:multicore              R Documentation

_F_u_n_c_t_i_o_n_s _f_o_r _m_a_n_a_g_e_m_e_n_t _o_f _p_a_r_a_l_l_e_l _c_h_i_l_d_r_e_n _p_r_o_c_e_s_s_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'children' returns all 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

_U_s_a_g_e:

     children()
     readChild(child)
     readChildren(timeout = 0)
     selectChildren(children = NULL, timeout = 0)
     sendChildStdin(child, what)
     kill(process, signal = SIGINT)

_A_r_g_u_m_e_n_t_s:

   child: child process (object of the class 'childProcess') or a
          process ID (pid)

 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 'NULL'. If 'NULL' behaves as if all
          currently known children were supplied.

    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 'process') or a process ID (pid)

  signal: signal to send (one of 'SIG...' constants - see 'signals' -
          or a valid integer signal number)

_V_a_l_u_e:

     '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'.

_W_a_r_n_i_n_g:

     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.

_A_u_t_h_o_r(_s):

     Simon Urbanek

_S_e_e _A_l_s_o:

     'fork', 'sendMaster', 'parallel', 'mclapply'

