[squeak-dev] Re: OSProcess capabilities on Windows

UZONYI Levente leves at elte.hu
Tue Mar 24 23:35:25 UTC 2009


Hi!

> So... I tried installing it, but none of my 3.7 images (on XP or on Vista)
> could work with the ready-built DLL.  Not even the out-of-the-box 3.7
> release.  The 3.9 release image seemed much happier: the precise example
> you gave here didn't work as I was expecting, but the basic example on the
> SqueakSource summary page did:
>
>  ProcessWrapper new
>    useStdout;
>    startWithShellCommand: 'echo hello';
>    upToEnd
>
>  -->  'hello<cr>'
>

To make sure that the given example works as expected, you have to make 
sure that cat (cat.exe) is in the vm's search path, or you have to use
the explicit path to the executable, like here:

p := ProcessWrapper new
         useStdout;
         startWithCommand: 'C:\UnxUtils\usr\local\wbin\cat.exe';
         yourself.
p writeToStdin: 'foo'.
self assert: (p next: 3) = 'foo'.
p closeStdin.

If you don't have cat.exe (because windows doesn't have it by default),
you can download the unxutils package which contains it from:
http://unxutils.sourceforge.net/

If you have cat.exe and touch.exe in the vm's search path, then you can 
run the tests in the package which should all be green.

Cheers,
Levente



More information about the Squeak-dev mailing list