+ Added documentation for uname
+ Mentioned open/read+write in dup->outport description
This commit is contained in:
parent
aa57bec9c2
commit
caebd13cfd
|
@ -548,12 +548,13 @@ and some port is already using that file descriptor,
|
|||
the port is first quietly shifted (with another \ex{dup})
|
||||
to some other file descriptor (zeroing its revealed count).
|
||||
|
||||
Since {\Scheme} doesn't provide read/write ports,
|
||||
\ex{dup->inport} and \ex{dup->outport} can be useful for
|
||||
getting an output version of an input port, or \emph{vice versa}.
|
||||
For example, if \ex{p} is an input port open on a tty, and
|
||||
we would like to do output to that tty, we can simply use
|
||||
\ex{(dup->outport p)} to produce an equivalent output port for the tty.
|
||||
Since {\Scheme} doesn't provide read/write ports, \ex{dup->inport} and
|
||||
\ex{dup->outport} can be useful for getting an output version of an
|
||||
input port, or \emph{vice versa}. For example, if \ex{p} is an input
|
||||
port open on a tty, and we would like to do output to that tty, we can
|
||||
simply use \ex{(dup->outport p)} to produce an equivalent output port
|
||||
for the tty. Be sure to open the file with the \ex{open/read+write}
|
||||
flag for this.
|
||||
\end{desc}
|
||||
|
||||
\defun {seek} {fd/port offset [whence]} {\integer}
|
||||
|
@ -2405,6 +2406,24 @@ This may be a local name, such as ``solar,'' as opposed to a
|
|||
fully-qualified domain name such as ``solar.csie.ntu.edu.tw.''
|
||||
\end{desc}
|
||||
|
||||
\defun {uname}{} {uname-record}
|
||||
\begin{desc}
|
||||
Returns a \emph{uname-record} of the following structure:
|
||||
\begin{code}
|
||||
(define-record uname
|
||||
os-name
|
||||
node-name
|
||||
release
|
||||
version
|
||||
machine)\end{code}%
|
||||
|
||||
Each of the fields contains a string.
|
||||
|
||||
Be aware that POSIX limits the length of all entries to 32 characters,
|
||||
and that the node name does not necessarily correspond to the
|
||||
fully-qualified domain name.
|
||||
\end{desc}
|
||||
|
||||
\section{Signal system}
|
||||
|
||||
Signal numbers are bound to the variables \ex{signal/hup}, \ex{signal/int},
|
||||
|
|
Loading…
Reference in New Issue