[squeak-dev] How to call irsend

Louis LaBrunda Lou at Keystone-Software.com
Fri Feb 8 17:00:06 UTC 2013


Hi Dave,

OSProcess class>>waitForCommand: (and what it calls) looks good but what if
runState never gets to #complete?  Would it loop forever or can't that
happen.  For now, I wait a second and after 50 tries give up and try the
command again.  I retry the command 50 times and then give up and
reschedule the request for the next time.

If I could be sure of completion (or if you added a completion limit, not
that I'm asking) it would simplify my code.

Lou

>That sound right to me. The exit status of the program is set some time
>after it exits (by means of a unix signal triggering a Smalltalk semaphore
>which wakes up a process that updates the status in the ExternalUnixOSProcess).

>For a simple command line program like this, just waiting a couple hundred
>milliseconds after you evaluate the command will allow time for the program
>to run and for Squeak to be informed of the outcome. So a retry loop with
>200ms delay is probably fine in this case. Come to think of it, there's
>an OSProcess class>>waitForCommand: that will probably do exactly what you
>want in this case.
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com



More information about the Squeak-dev mailing list