[Ecls-list] si:file-stream-fd && gray:stream-file-descriptor

Matthew Mondor mm_lists at pulsar-zone.net
Sat Mar 20 23:45:10 UTC 2010


On Sat, 20 Mar 2010 19:35:46 -0400
Matthew Mondor <mm_lists at pulsar-zone.net> wrote:

> I think that this is different, for the stream now works fine, and an
> error is signalled properly when fdopen(2) fails...  So here fdopen(2)
> succeeded, the stream was created and I could read-char and read-line
> from it, but the functions which now crash are the ones to query the
> underlaying file descriptor afterwards (si:file-stream-fd,
> gray:stream-file-descriptor).

When I tested si:file-stream-fd the intention was to verify if it works
so that I could possibly implement an alternative function which
instead of using fileno(3) on the file handle could possibly report the
fh error/eof state.  Because unfortunately, FORCE-OUTPUT will not
report at all why it stopped flushing if an error occurred, so I should
either be able to use fflush(3) from C and/or ferror(3)/feof(3), but
for that I need the pointer to the underlaying stdio FILE stream.

Thanks,
-- 
Matt




More information about the ecl-devel mailing list