Shell and Background Jobs
Mark Schonewille
m.schonewille at economy-x-talk.com
Tue Aug 23 16:53:49 EDT 2011
Hi Chris,
Surely the open process command works on Mac OS X.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
What does that error mean? Buy LiveCodeErrors for iPhone now http://qery.us/v4 A must-have for LiveCode programmers.
On 23 aug 2011, at 22:32, Nonsanity wrote:
> Now that the earth has stopped shaking here, I can re-write this email. I
> lost the first rendition by switching to the USGS web site for details on
> the 5.9 earthquake we had nearby (geographically speaking). Anyway...
>
> I've been trying to do some shell() background jobs on the Mac, ones that
> will take a long time to execute. Sometimes adding the & to the end of the
> string I pass to shell() makes shell return immediately, and I can see the
> task started in Process Monitor. Other times shell keeps control until the
> task is done (or I kill it in frustration).
>
> I made a new stack with a button and a field and put this script in the
> button:
>
> on mouseup
> put "start" into fld 1
> get shell( "sleep 5 &" )
> put "end" into fld 1
> end mouseup
>
> Now that SHOULD background the sleep so that shell returns immediately and
> replaces the "start" with "end" in fld 1 so that you never really even see
> the "start". But I get 5 seconds of "start" before "end" appears.
>
> In Terminal, the same "sleep 5 &" will return immediately, while leaving off
> the "&" will make it delay 5 seconds before getting a new prompt.
>
> At the same time, I have a big, complex HandBrake command that DOES
> background correctly. I can't figure out why that one works consistently. :(
>
> Has anyone else researched this and found some pertinent facts they can
> share?
>
> (WHY OH WWHHYY doesn't the "start process" commands work on Macs????)
>
> ~ Chris Innanen
> ~ Nonsanity
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list