[squeak-dev] Re: Unix OSProcess error

Andreas Raab andreas.raab at gmx.de
Thu Aug 6 20:08:35 UTC 2009


David T. Lewis wrote:
> If you can send me an example of something that you are doing, I'll try to
> suggest something more specific to address the problem. I'm away from Squeak
> at the moment, so it may take me a while to respond.

We're doing stuff along the lines of:

"fire off the external command"
cmd := PipeableOSProcess command: '/home/qwaq/server/script.sh'
	environment: nil
	workingDir: nil
	input: nil
	output: nil
	error: nil
	errorPipelineStream: nil.

"wait for completion"
start := Time millisecondClockValue.
[cmd isComplete not and:[(Time millisecondsSince: start) < deadline]]
	whileTrue:[(Delay forMilliseconds: 100) wait].
cmd isComplete ifFalse:[^self error: 'timeout'].

descriptors := cmd outputAndError.
"... processing of output and error omitted ..."

And that's it. Is there anything that we need to clean up here?

Thanks,
   - Andreas



More information about the Squeak-dev mailing list