Commit 0cb98e38 authored by pw's avatar pw
Browse files

From Eric Marsden

The following patch adds a description of the *environment-list*
variable to the user manaul. It also provides an example for using the
Unix syscalls.
parent 574de697
......@@ -9893,6 +9893,20 @@ structures.
A stream connected to \file{/dev/tty}.
The environment variables inherited by the current process, as a
keyword-indexed alist. For example, to access the DISPLAY
environment variable, you could use
(cdr (assoc :display ext:*environment-list*))
Note that the case of the variable name is lost in the conversion
to a keyword.
%%\node Lisp Equivalents for C Routines, Type Translations, Useful Variables, UNIX Interface
\section{Lisp Equivalents for C Routines}
......@@ -10055,6 +10069,16 @@ The Unix system calls indicate an error by returning \false{} as the
first value and the Unix error number as the second value. If the call
succeeds, then the first value will always be non-\nil, often \code{t}.
For example, to use the \code{chdir} syscall:
(multiple-value-bind (success errno)
(unix:unix-chdir "/tmp")
(unless success
(error "Can't change working directory: ~a"
(unix:get-unix-error-msg errno))))
This function returns a string describing the Unix error number
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment