[Etoys] finalStripping hangs waitForCommand
David T. Lewis
lewis at mail.msen.com
Mon Jun 15 22:00:26 EDT 2009
On Mon, Jun 15, 2009 at 09:20:27PM +0530, K. K. Subramaniam wrote:
> On etoys4#2229+OSProcessV4-3-7, the waitForCommand: hangs after executing:
> ReleaseBuilderSqueakland new prepareReleaseImageForSqueakland.
> Cursor wait showWhile: [ OSProcess waitForCommand: 'sleep 2']
> works fine just before this command but if run after this send, the method
> hangs waiting for runState to turn from #running to #complete even after the
> child process is done.
> I was able to narrow down the difference to
> ReleaseBuilderForSqueakland>>finalStripping ... >>discardFFI ..
> Commands issued (in a separate workspace) just before this call work fine. The
> one issued after this call hangs. Has anyone else bumped into this problem?
> Any hints on tracing race conditions or side effects?
I have not tried this specific Etoys scenario but in general if an external
process proxy does not go from #running to #complete, it is usually because
that external process is still blocked while trying to write to its standard
output or standard error stream, and thus is not yet able to exit.
If this is happening, you may get better results if you load the CommandShell
package in addition to OSProcess. Then you can use the PipeableOSProcess and
ProxyPipeline classes, which provide more complete support for handling the
output streams from external processes (see the class side #command: methods
in these two classes).
Sorry I do not know the specifics of what #prepareReleaseImageForSqueakland
is doing, so maybe this is not helpful. But feel free to ask me any OSProcess
questions off list and I'll try to help if I can.
More information about the etoys-dev