[Vm-dev] Re: [squeak-dev] stdio

David T. Lewis lewis at mail.msen.com
Sun Dec 6 17:53:04 UTC 2009


On Sat, Dec 05, 2009 at 05:09:12PM -0800, Eliot Miranda wrote:
>  
> Hi Bert, David, Ian, John,
> 
> On Sat, Dec 5, 2009 at 3:36 PM, Bert Freudenberg <bert at freudenbergs.de>wrote:
> >
> > Since the VM maintainers didn't like my hack (which I can understand),
> > maybe we could finally add the necessary primitives. There have been a
> > couple proposals already. I'm not quite sure why none made it into the VM.
> >
> > - Bert -
> >
> > (*) http://dev.laptop.org/ticket/8194
> 
> 
> FWIW here's the code in the Teleplace VM, and some code to use them for
> StandardFileStream.
> 
> In sqFileStdioHandles-ccode are implementations of sqFileStdioHandlesInto:
> for platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c and
> platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c
> 
> In  primitiveFileStdioHandles.st is the VMMaker code for the FilePlugin and
> the UnixOSProcessPlugin that uses sqFileStdioHandlesInto:.
> 
> In stdioHandles.st is code for StandardFileStream that allows the creation
> of streams on stdin stdout & stderr (untested on Win32).
> 
> HTH
> Eliot

Thanks Eliot,

For reference, here is the one I posted a while back:
http://lists.squeakfoundation.org/pipermail/vm-dev/2008-September/002022.html

This is similar to the Teleplace implementation, but uses no C support
code at the expense of some more code in the image. It works on Windows
if and only if we provide a hook for telling the Windows support code
that the fileID in question is legitimate (the Windows support code
keeps a registry of valid file handles). The Teleplace implementation
for Windows should work fine too, although I think it will require adding
some code to deal with the aforementioned registry in the Windows file
plugin.

As Bert points out, we are overdue for putting this into the VM so I
guess we should pick an implementation and get on with it. I have a
personal bias towards my own approach (*), so I wonder if we might
impose upon Bert to serve as the voice of the customer, pick one, and
tell us to just do it ;)

(*) because it can be used for pipe streams as well as stdin/out/err

Dave



More information about the Vm-dev mailing list