[squeak-dev] OSProcess capabilities on Windows

Aran Lunzer aran at meme.hokudai.ac.jp
Tue Mar 24 14:54:11 UTC 2009


Hi

Today I've been playing with OSProcess and CommandShell, to see if they
can give me the control I'd like for running external processes on Windows
(XP, then later Vista).  The VM I'm using is a somewhat customised
Web-browser plugin based on 3.7.  The image is a pretty heavily customised
3.7.

The plugin I built today seems to be working, and with a bit of tweaking
I've successfully launched batch-file commands from the Squeak shell or by
talking directly to CommandShell.  However, I'm having trouble figuring
out which aspects of the overall (and impressive) Unix-oriented behaviour
are supposedly available for Windows platforms.  On the OSProcess web page
it just says "The Windows support is not as complete as that for Unix, but
it is sufficient for running external Win32 programs from Squeak."

Ideally what I'd like to do is launch an executable (a Java application,
typically invoked through a batch file) that listens for user-typed
commands on stdin, and produces console-style responses.  I'd like to
throw commands at it from Squeak, listen for the corresponding results,
then eventually shut it down.

However, as things are:

 - CommandShell will happily start a command, but only if it includes
redirections for both stdout and stderr.  Otherwise I get walkbacks from
two BufferedAsyncFileReadStream instances, which find themselves unable
to run primTestEndOfFileFlag:

 - Even if I do provide stdout and stderr redirections, they don't
actually receive any output from the running process.

So - is it that ExternalPipes are (for now) completely unsupported for
Windows?  Or have I just managed to mess things up somewhere?

If they're not available, I'm hoping I can hack something up using a
Unix-style "tail" command to deliver the input, or some such scheme.  That
was the plan before I found these packages.


Thanks -

Aran
--
Aran Lunzer
Hokkaido University, Japan






More information about the Squeak-dev mailing list