21.8. Function `EXT:MAKE-STREAM`
Prev | Chapter 21. Streams | Next

## 21.8. Function `EXT:MAKE-STREAM`

Function `EXT:MAKE-STREAM` creates a Lisp stream out of an OS file descriptor: `(`EXT:MAKE-STREAM` `object` `&KEY` `:DIRECTION` `:ELEMENT-TYPE` `:EXTERNAL-FORMAT` `:BUFFERED`)`

`object` designates an OS handle (a file descriptor), and should be one of the following:

number
  denotes the file descriptor of this value
`:INPUT`
  denotes CLISP process `*STANDARD-INPUT*`
`:OUTPUT`
  denotes CLISP process `*STANDARD-OUTPUT*`
`:ERROR`
  denotes CLISP process `*ERROR-OUTPUT*`
`STREAM`
  denotes the handle of this stream, which should be a `FILE-STREAM` or a `SOCKET:SOCKET-STREAM`

### Beware of buffering!

When there are several Lisp `STREAM`s backed by the same OS file descriptor, the behavior may be highly confusing when some of the Lisp streams are `:BUFFERED`. Use `FORCE-OUTPUT` for output `STREAM`s, and bulk input for input `STREAM`s.

The handle is duplicated (with `dup`), so it is safe to `CLOSE` a `STREAM` returned by `EXT:MAKE-STREAM`.

| These notes document CLISP version 2.45 | Last modified: 2008-05-14

Enter your search termsSubmit search form
Webclisp.cons.orgclisp.podval.orgwww.lisp.org

Prev | Up | Next
21.7. Function `STREAM-ELEMENT-TYPE` | Home | 21.9. Function `FILE-POSITION`