[asdf-devel] clisp getuid

Pascal Bourguignon pjb at informatimago.com
Mon Feb 8 14:47:18 UTC 2010


In asdf.lisp downloaded from the web page this afternoon, line 500.

With clisp, the package LINUX is available only in special circumstances.
(it has to run on Linux, AND the glibc bindings module must have been 
compiled AND clisp must have been launched with it, usually with -Kfull).

So when using the LINUX package on clisp, we must test for it explicitely:

#+(and clisp #.(cl:if (cl:find-package "LINUX") '(:and) '(:or)))
(defun get-uid () (linux:getuid))

A better alternative is to use POSIX:UID, which is available on a wider 
range of systems (IIRC, MS-Windows is POSIX too):
#+clisp (defun get-uid () (POSIX:UID))

(and similarly for the PID if needed, (POSIX:PROCESS-ID))
-- 
__Pascal Bourguignon__





More information about the asdf-devel mailing list