gb at clozure.com
Sun Sep 25 12:42:13 PDT 2005
On Sun, 25 Sep 2005, Julian Squires wrote:
> This might be a stupid question, as I don't know much about the
> internals of OpenMCL. I was wondering whether it's possible to get a
> "normal" stream (one for which STREAMP returns T) from
> CCL::MAKE-FD-STREAM, and also whether that function will ever be
> exported from CCL.
CCL::MAKE-FD-STREAM creates a Gray stream; all streams in OpenMCL are
Gray streams, and STREAMP returns T when applied to any of them.
(This has nothing to do with CMUCL's fd-streams as I remember them; it
happens to be the case that many interestring subclasses of STREAM -
including file streams and network sockets - operate on file
descriptors, and CCL::MAKE-FD-STREAM handles many of the buffer
creation and other details that're common to those classes.
I wasn't planning on exporting or documenting CCL::MAKE-FD-STREAM,
not so much because there's a deep reason not to as because it's
work to do so and there's other work that seems higher in priority.
(I wasn't planning on changing CCL::MAKE-FD-STREAM, either.)
> I'm currently maintaining a package called OSICAT that makes use of
> fd-streams, where available, to provide an interface to tmpfile(3). The
> alternative, on implementations without fd-streams, is a lot less
> elegant and probably less secure. So, I was hoping to get OpenMCL to
> support fd-streams at a level similar to CMUCL.
It sounds like what you really need is the ability to open and perform
some operations on a file descriptor, and then create a stream that
does I/O to and from that file descriptor. It's not clear that
that has anything to do with CMUCL's notion of an "fd-stream", but
it does seem clear that it'd be a lot easier to call CCL::MAKE-FD-STREAM
in OpenMCL than to do everything that CCL::MAKE-FD-STREAM does yourself,
or to invent a new class of FILE-STREAM.
> Julian Squires
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel