[R] reading PID
guido at sirio.stat.unipd.it
Wed May 23 16:11:32 CEST 2001
On Wed, May 23, 2001 at 06:47:47AM -0700, M. Edward Borasky wrote:
> The classical use for one's own PID is generating a unique temporary file
You can use 'tempfile()' for this (main advantage: it is portable
to non Unix platform).
Anyway, if you really want the R's PID, the following one line
command work for me under Linux (Debian 2.2 to be exact)
> PID<-as.numeric(system("ps|grep R.bin|sed \"s/ .*//\"",intern=TRUE))
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