[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] FilePlugin>>primitiveFileAtEnd for non-regular files (#232)

akgrant43 notifications at github.com
Sat Mar 31 16:24:42 UTC 2018


Hi Nicolas,

There are actually 3 or 4 issues (depending on what you want to include at the moment):

1. ZnBufferedReadStream was doing the wrong thing (the image side issue you mentioned).
That has been fixed.

2. #atEnd returns the wrong information for non-regular files on Unix.
That's what this PR will fix.
http://lists.squeakfoundation.org/pipermail/vm-dev/2018-March/027342.html demonstrates the issue.

3. Stdio streams are treated as a special case on Unix.
Now that we can open streams by file descriptor we're almost at the point where we can remove special handling for stdio streams on Unix.  I haven't gone through all the code to be sure though.  That would obviously simplify things.

4. Stdio streams are treated as a special case on Windows.
I haven't looked at this at all.

> And excuse the naive question, but why feof() would not work for all cases?

It might, but currently there are tests in the Pharo automated test suite which explicitly check that #atEnd returns true when the stream has returned the last character (but not past it).  I don't know how important these tests are.

Cheers,
Alistair


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/232#issuecomment-377704874
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180331/39e33824/attachment.html>


More information about the Vm-dev mailing list