Shell commands are blocking -- work around?
sarah.reichelt at gmail.com
Mon Nov 13 20:23:08 CST 2006
> Sarah: I'll try using your method first, why don't
> you use "send in 1 second until the file is not empty" or something like
> that, instead of a repeat loop with wait?
I guess I could have done it that way, but I would have to incorporate
a check for reading a file that was not yet complete, or for a file
reading error, if it was still in use by the shell. This works very
quickly if there is a connection, and handles a failure smoothly.
> BTW: from man sh, "REDIRECTION" Section
> The mysterious part.. still archane, but there's a touch of light here.
> and lots of other stuff in man sh, if you have the stomach for bash.
> Note that the order of redirections is significant. For example, the
> ls > dirlist 2>&1
> directs both standard output and standard error to the file
> while the command
> ls 2>&1 > dirlist
> directs only the standard output to file dirlist, because the
> error was duplicated as standard output before the standard
> output was
> redirected to dirlist.
Thanks for this info, I'm getting worried now, because I almost
understand it :-)
More information about the use-livecode