+
+(defun getpid ()
+ "Return the PID of the lisp process."
+ #+allegro (excl::getpid)
+ #+(and lispworks win32) (win32:get-current-process-id)
+ #+(and lispworks (not win32)) (system::getpid)
+ #+sbcl (sb-posix:getpid)
+ #+cmu (unix:unix-getpid)
+ #+openmcl (ccl::getpid)
+ #+(and clisp unix) (system::process-id)
+ #+(and clisp win32) (cond ((find-package :win32)
+ (funcall (find-symbol "GetCurrentProcessId"
+ :win32)))
+ (t
+ (system::getenv "PID")))
+ )
+
+