From: Kevin M. Rosenberg Date: Mon, 27 Dec 2004 03:46:01 +0000 (+0000) Subject: r10227: updates from phoview@lynx X-Git-Tag: v1.96~43 X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=commitdiff_plain;h=86a868a95313178cdc7a83d35856ccf5c2cf315f r10227: updates from phoview@lynx --- diff --git a/os.lisp b/os.lisp index cce2a2f..9eece91 100644 --- a/os.lisp +++ b/os.lisp @@ -159,3 +159,21 @@ returns (VALUES output-string pid)" #-allegro (with-open-file (in file :direction :input) (file-length in)))) + +(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::program-id) + #+(and clisp win32) (cond ((find-package :win32) + (funcall (find-symbol "GetCurrentProcessId" + :win32))) + (t + (system::getenv "PID"))) + ) + + diff --git a/package.lisp b/package.lisp index 8a1c24d..db3f1c7 100644 --- a/package.lisp +++ b/package.lisp @@ -295,6 +295,7 @@ #:run-shell-command-output-stream #:delete-directory-and-files #:file-size + #:getpid ;; color.lisp #:rgb->hsv