Using open process instead of shell
Warren Samples
warren at warrensweb.us
Mon Dec 25 00:10:16 EST 2017
On 12/24/2017 04:05 PM, Stephen Barncard via use-livecode wrote:
> All of the commands work great by using the shell command in LC, except for
> the fact that my app waits until some of the commands have finished.
If your concern is bypassing the blocking nature of shell(), then you
should be aware that there are methods which detach a process from the
shell after opening it and these can be used in LiveCode shell() to make
it non-blocking.
For example:
get shell ("nohup mycommand --some-params 'can use single quotes to
escape if necessary' &")
here the command is prefaced with the 'nohup' and a space and is closed
with a space and &
There are several variations for redirecting to /dev/null which also
work to make the shell() non-blocking. Here's an example:
get shell ("mycommand --some-params 'can use single quotes to escape if
necessary' </dev/null &>/dev/null &")
This doesn't respond to your direct question about "open process" but it
*may* be a straightforward way to resolve the issue that has caused you
to inquire.
Good Luck,
Warren
More information about the use-livecode
mailing list