[plt-scheme] current process id
On Feb 5, David J. Neu wrote:
> Hi all,
>
> I'm wondering if there is a way to determine the current process id
> from within a mzscheme program?
I don't think that there is any way to do it completely from inside
MzScheme (it would probably be a useful extension). Anyway, if you're
using Linux, a simple way to get the current pid is:
(string->number (resolve-path "/proc/self"))
I found similar tricks for Sun (cd into /proc/self, then check the
current directory), and FreeBSD (use "/proc/curproc").
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!