MacOS X VM

Ian Piumarta ian.piumarta at inria.fr
Wed Nov 3 21:48:07 UTC 2004


On 02 Nov 2004, at 22:40, Ned Konz wrote:

>> I'd like to get my hands on stdin/stdout/stderr of the main squeak 
>> process.
>> I've got Ian's OS X binaries and OSProcess seems to work (at least, 
>> the
>> CommandShell works) although not all of tests pass.  But 'OSProcess
>> helloWorld' doesn't print anything to the console that started squeak.
>>
>> Pointers? Ideas?
>
> Another possibility is to use the Unix VM for the Mac, and just start 
> it from
> a shell script.

This is by far the easiest way to run the VM and have stdin/out/err 
point at something useful (the controlling terminal).  You have to run 
the binary (.../Contents/MacOS/squeak) directly, rather than "open"ing 
the application.  (When you run "open" on an app, stdio is redirected 
to less useful places -- as if you'd double-clicked on the app's icon 
from within the Finder.)

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.

(FWIW, if you "open" an app or double-click the icon then stderr is 
redirected to the "console log", the contents of which you can see by 
running the "console" app in the /Applications/Utilities folder.  I 
don't know [but doubt] if stdout reaches the same place, and I suspect 
stdin is simply closed before the app even gets control.)

Ian




More information about the Squeak-dev mailing list