[R] reading PID

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 23 14:58:47 CEST 2001


On Wed, 23 May 2001, Frank Gerrit Zoellner wrote:

> How can I read the process id of my actual R session?

That's an OS-specific question, isn't it?  Let me guess, Linux.  There is
no specific way to get the pid within an R process (what could you do
with it?), but you can trivially dyn.load some code to tell you via a call
to getpid.

Of course adding a Sys.getpid() function would be easy, but what use would
it be?  Also, what type is pid_t to map to in R?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list