getpid                 package:fork                 R Documentation

_O_b_t_a_i_n _t_h_e _p_r_o_c_e_s_s _i_d _f_o_r _t_h_e _c_u_r_r_e_n_t _p_r_o_c_e_s_s.

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

     Obtain the process number for the current process.

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

     getpid()

_D_e_t_a_i_l_s:

     This function is a simple wrapper around the Unix "getpid"
     function call.

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

     Integer process id.

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

     Gregory R. Warnes gregory_r_warnes\@groton.pfizer.com

_R_e_f_e_r_e_n_c_e_s:

     Unix "getpid" man page

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

     'fork', 'exit', 'wait', 'kill', 'killall'

_E_x_a_m_p_l_e_s:

     getpid()

     ## Not run: 
     for(i in 1:10)
       fork( function() { cat("PID:", getpid(), "\n"); exit()} )
     ## End(Not run)

