+ 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})
|
the port is first quietly shifted (with another \ex{dup})
|
||||||
to some other file descriptor (zeroing its revealed count).
|
to some other file descriptor (zeroing its revealed count).
|
||||||
|
|
||||||
Since {\Scheme} doesn't provide read/write ports,
|
Since {\Scheme} doesn't provide read/write ports, \ex{dup->inport} and
|
||||||
\ex{dup->inport} and \ex{dup->outport} can be useful for
|
\ex{dup->outport} can be useful for getting an output version of an
|
||||||
getting an output version of an input port, or \emph{vice versa}.
|
input port, or \emph{vice versa}. For example, if \ex{p} is an input
|
||||||
For example, if \ex{p} is an input port open on a tty, and
|
port open on a tty, and we would like to do output to that tty, we can
|
||||||
we would like to do output to that tty, we can simply use
|
simply use \ex{(dup->outport p)} to produce an equivalent output port
|
||||||
\ex{(dup->outport p)} to produce an equivalent output port for the tty.
|
for the tty. Be sure to open the file with the \ex{open/read+write}
|
||||||
|
flag for this.
|
||||||
\end{desc}
|
\end{desc}
|
||||||
|
|
||||||
\defun {seek} {fd/port offset [whence]} {\integer}
|
\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.''
|
fully-qualified domain name such as ``solar.csie.ntu.edu.tw.''
|
||||||
\end{desc}
|
\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}
|
\section{Signal system}
|
||||||
|
|
||||||
Signal numbers are bound to the variables \ex{signal/hup}, \ex{signal/int},
|
Signal numbers are bound to the variables \ex{signal/hup}, \ex{signal/int},
|
||||||
|
|
Loading…
Reference in New Issue