Getting Rev control back after shell()

Ken Ray kray at sonsothunder.com
Wed Jan 12 10:38:59 EST 2005


On 1/12/05 9:29 AM, "RGould8 at aol.com" <RGould8 at aol.com> wrote:

> 
> In a message dated 1/11/05 4:04:01 PM, kray at sonsothunder.com writes:
> 
> 
>> On 1/11/05 2:04 PM, "RGould8 at aol.com" <RGould8 at aol.com> wrote:
>> 
>>> If I've got a shell() call that executes a unix command that takes awhile
>> to
>>> complete (up to 3 minutes), is there a way to give control back to
>> Revolution
>>> while it's taking place?
>> 
>> It depends... do you need to get data back from shell or is it purely an
>> "execute this command" situation?
>> 
>> 
>> 
> This is a unix call for imaging drives, but I have figured out a way to route
> the output from that unix call to a text file.   My hope was to somehow have
> Rev start up the disk imaging call process, get control back immediately, and
> have Revolution read that text file every 5 seconds to check on the status.
> It's the "getting control back immediately" part that's presently the problem.
>   Since the same issue occurs when executing the call in Terminal, I know
> it's not Rev's fault.   I guess I could just use some unix advice on
> sublaunching 
> processes.

My understanding is that if you put a "&" after the command for the
terminal, it causes it to become asynchronous and immediately return. I
haven't tried it yet, though. You'll need to use the "sh" shell, however.

Here's where I got that info:

  http://www.dartmouth.edu/~rc/classes/ksh/print_pages.shtml

Give it a shot and let us know if it works...


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list