[squeak-dev] FileStream stdout closed?

David T. Lewis lewis at mail.msen.com
Mon Oct 14 02:06:31 UTC 2019


It's a bug.

It may be more of a conceptual bug than a code error. The "size" of
the stdout file stream is not knowable, so the file size test in
StandardFileStream>>closed does not really make sense in the context
of an output stream that typically is not attached to a file.

Having said that, I see this result with the classic interpreter VM
on an updated image (trunk level update but old V3 image format):

  OSProcess thisOSProcess stdOut closed ==> false
  FileStream stdout closed ==> true.

And with the current Cog/Spur on a similar level image:

  OSProcess thisOSProcess stdOut closed ==> true
  FileStream stdout closed ==> true

So at one time, the test worked correctly with OSProcess.

So maybe there is a way to have it work as expected with FileStream>>stdout
(and OSProcess again). I suspect the differences may be related to
VM changes in the SQFile data structure, but I have not checked to
confirm.

Dave


On Sun, Oct 13, 2019 at 02:52:26PM +0200, Fabio Niephaus wrote:
> Hi all,
> 
> `FileStream stdout closed` returns `true`. Is there a specific reason for
> this or is it a bug?
> 
> Cheers,
> Fabio

> 



More information about the Squeak-dev mailing list