Challenge: who can background this shell command?
David Bovill
david.bovill at gmail.com
Thu Aug 1 09:20:17 EDT 2019
That works in the message box - thanks Matthias.
The only thing is I can't (yet) tell what port the server is running on - I
can see from the terminal (using pgrep) the process id of the started
server - but it does not appear to be serving correctly on the default
server port...
Do you think there is a way to redirect the output to Livecode's result or
it variable - I seem to remember that there have been some changes to that
to make such a construction possible in Livecode - alternatively maybe the
output can be directed to a temporary file instead of " /dev/null"???
Nearly there :)
On Thu, 1 Aug 2019 at 13:39, Matthias Rebbe via use-livecode <
use-livecode at lists.runrev.com> wrote:
> This let me run it without blocking. It redirects the stdout and stderr if
> i recall it correct.
>
> "vi > /dev/null 2>&1 &"
>
>
>
> Matthias Rebbe
>
> free tools for Livecoders:
> InstaMaker <https://instamaker.dermattes.de/>
> WinSignMaker Mac <https://winsignhelper.dermattes.de/>
>
> > Am 01.08.2019 um 13:55 schrieb David Bovill via use-livecode <
> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
> >
> > The challenge is to figure out a technique we can use in Livecode to be
> > able to call long running shell processes (typically something like an
> http
> > server process) without blocking Livecode.
> >
> > To test this without asking anyone to install some cli I thought we could
> > try it with an existing long running process that everyone should have in
> > their terminal - vi
> >
> > So how do you:
> >
> > *put* shell ("vi")
> >
> > I've tested this and it does not crash here on latest OSX. You do have to
> > type command-period a few times to unblock things - but it is more or
> less
> > safe to try in the message box.
> >
> > I've also tried:
> >
> > *put* shell ("vi &")
> >
> > The aim is to out the process in the background, or some other technique
> -
> > like make a bash script that contains the line that launches vi (ie
> "vi") -
> > or perhaps uses screen or tmux, or some trick in Livecode (open process
> > does not work for this on OSX)...
> >
> > Who can crack this tricky nut :)
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com <mailto: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
>
> _______________________________________________
> 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