Shell commands are blocking -- work around?

Geir A. Myrestrand gmyrestrand at
Mon Nov 13 10:46:40 EST 2006

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.

Geir A. Myrestrand

More information about the Use-livecode mailing list