Using open process instead of shell

Stephen Barncard stephen at barncard.com
Mon Dec 25 03:24:22 EST 2017


Thank you very much,

 great ideas from Mark Wieder, Mike Bonner, Warren Samples

 I will be working with these  suggestions for the next couple of days and
 report back to you guys.

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Dec 24, 2017 at 9:10 PM, Warren Samples via use-livecode <
use-livecode at lists.runrev.com> wrote:

> 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
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list