MacOS X VM

David T. Lewis lewis at mail.msen.com
Thu Nov 4 01:47:10 UTC 2004


On Wed, Nov 03, 2004 at 01:48:07PM -0800, Ian Piumarta wrote:
> 
> It's ages since I looked inside OSProcess, but if it lets you 
> send/receive Strings to/from stdio and you run the binary in the above 
> manner then you should be able to interact with the controlling 
> terminal trivially.

OSProcess gives you a StandardFileStream attached to the stdio streams.
Actually it's an AttachableFileStream, which is just a StandardFileStream
grafted onto an existing stdin/stdout/stderr handle.

Also, even though I don't have an OS X system to try it on, it's just
another Unix system underneath so you can probably do things like:

 FileStream oldFileNamed: '/dev/tty'

Which gives you a StandardFileStream on the stdin/stdout streams. Be
careful about closing these streams by the way, as they tend to stay
closed, and they refer to the same IO streams that OSProcess is using.

Dave




More information about the Squeak-dev mailing list