[RCR] IO#clearerr

A

Ara.T.Howard

we need it. any reason why it couldn't shouldn't be done?

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 
T

Tanaka Akira

Ara.T.Howard said:
we need it. any reason why it couldn't shouldn't be done?

ruby 1.8.3 calls clearerr before getc automatically because stdio has
non-portability about that.

ruby 1.9 has no error and EOF flag to clear because it doesn't use
stdio.
 
A

Ara.T.Howard

ruby 1.8.3 calls clearerr before getc automatically because stdio has
non-portability about that.

ruby 1.9 has no error and EOF flag to clear because it doesn't use
stdio.

o.k. - so that should let me read past eof (multiple clients sending data down
pipe one at the time)

but i still can't write past EOF. i want to keep some output pipes open and
simply send EOF down them (close, clearerr) to indicate no more data. any
thought on that?

btw. ever looked at sfio?

cheers.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 
T

Tanaka Akira

Ara.T.Howard said:
but i still can't write past EOF. i want to keep some output pipes open and
simply send EOF down them (close, clearerr) to indicate no more data. any
thought on that?

Try it in C. I think it doesn't work.
 
A

Ara.T.Howard

Try it in C. I think it doesn't work.


it sure doesn't seem to. but, from the man page:

...
DESCRIPTION
The function clearerr clears the end-of-file and error indicators for
the stream pointed to by stream.

The function feof tests the end-of-file indicator for the stream
pointed to by stream, returning non-zero if it is set. The end-of-file
indicator can only be cleared by the function clearerr.
...

sure sounds like it should. back to researching ;-(

regards.

-a
--
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| Your life dwells amoung the causes of death
| Like a lamp standing in a strong breeze. --Nagarjuna
===============================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top