Shell commands are blocking -- work around?

Sarah Reichelt sarah.reichelt at gmail.com
Mon Nov 13 21:24:28 EST 2006


On 11/14/06, Geir A. Myrestrand <gmyrestrand at hotmail.com> wrote:
> Sarah Reichelt wrote:
> >
> > Here is my way around this problem. The example below is for a "ping"
> > command, but I'm sure you can adapt it to your stuff.
> >
> > As you can see, I direct the output of the shell command to a
> > temporary text file. The second part of the shell command containing
> > the "2>&1 &" is the relevant section. I don't understand it but it
> > works :-)
>
> 2>&1 means that you want anything sent to stderr (2) redirected to
> stdout (1), meaning that stdout now will be both stdout and stderr.
>
> The trailing & simply means that you want to run it in the background,
> and you're then free to run other commands while this command is running
> in the background.

Thanks Geir, I think I get it now, but I keep it in my scrapbook,
because I would never remember it.

Cheers,
Sarah



More information about the use-livecode mailing list