[plt-scheme] Re: getpid

From: David Van Horn (dvanhorn at cs.uvm.edu)
Date: Mon Mar 28 15:27:49 EST 2005

David J. Neu wrote:
> Would it be possible to have a getpid procedure, that would return the
> process id, included with mzscheme?  I've written a (one procedure)
> mzscheme extension, but I'd prefer not have to carry around and manage
> the installation of the C code.

You could use foreign.ss instead:

(require (lib "foreign.ss"))
(define getpid
   (get-ffi-obj "getpid" (ffi-lib "libc") (_cprocedure () _int)))


Posted on the users mailing list.