<p>Hi Nicolas,</p>
<p>There are actually 3 or 4 issues (depending on what you want to include at the moment):</p>
<ol>
<li>
<p>ZnBufferedReadStream was doing the wrong thing (the image side issue you mentioned).<br>
That has been fixed.</p>
</li>
<li>
<p>#atEnd returns the wrong information for non-regular files on Unix.<br>
That's what this PR will fix.<br>
<a href="http://lists.squeakfoundation.org/pipermail/vm-dev/2018-March/027342.html" rel="nofollow">http://lists.squeakfoundation.org/pipermail/vm-dev/2018-March/027342.html</a> demonstrates the issue.</p>
</li>
<li>
<p>Stdio streams are treated as a special case on Unix.<br>
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.</p>
</li>
<li>
<p>Stdio streams are treated as a special case on Windows.<br>
I haven't looked at this at all.</p>
</li>
</ol>
<blockquote>
<p>And excuse the naive question, but why feof() would not work for all cases?</p>
</blockquote>
<p>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.</p>
<p>Cheers,<br>
Alistair</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/232#issuecomment-377704874">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW8ysok_yKXNJ-jWAO4_PhCKBq3csks5tj63KgaJpZM4S6rMa">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW2wYalQftOG901PG8bljqOd-MpCIks5tj63KgaJpZM4S6rMa.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/232#issuecomment-377704874"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@akgrant43 in #232: Hi Nicolas,\r\n\r\nThere are actually 3 or 4 issues (depending on what you want to include at the moment):\r\n\r\n1. ZnBufferedReadStream was doing the wrong thing (the image side issue you mentioned).\r\nThat has been fixed.\r\n\r\n2. #atEnd returns the wrong information for non-regular files on Unix.\r\nThat's what this PR will fix.\r\nhttp://lists.squeakfoundation.org/pipermail/vm-dev/2018-March/027342.html demonstrates the issue.\r\n\r\n3. Stdio streams are treated as a special case on Unix.\r\nNow 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.\r\n\r\n4. Stdio streams are treated as a special case on Windows.\r\nI haven't looked at this at all.\r\n\r\n\u003e And excuse the naive question, but why feof() would not work for all cases?\r\n\r\nIt 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.\r\n\r\nCheers,\r\nAlistair\r\n"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/232#issuecomment-377704874"}}}</script>