Launching a cli server as background process in OSX

David Bovill david.bovill at gmail.com
Thu Aug 1 07:49:21 EDT 2019


Thanks everyone - Mark - it's not an issue with accessing hugo from shell -
get shell ("hugo server") works fine - it just blocks as the server process
keeps running as it should do - so I want to background it.

Richard - yes I've tried that. In fact I tried all these different
techniques to the best of my ability:

   - *put shell ("hugo server")*
   - *put shell ("hugo server &")*
   - *get shell ("nohup hugo server >&/dev/null")*
   - *get shell ("screen hugo server")*

*I've tried various combinations of this in a bash script:*

#!/bin/bash
> hugo server
> wait
> echo "All processes done!"


   - *get shell ("bash bg_hugo_server.sh")*
   - *open* process "bash bg_hugo_server.sh"
   - *launch "bg_hugo_server.sh"*

It's something over the years I've had a go at several times. Always
assumed there would be some way of doing it - so I spent half a day trying
to no joy. I guess the question comes down to:


   - How do you nackground a persistant shell process in Livecode on OSX
   (and other platforms)?


I'll try and get a simple test scenario...


On Thu, 1 Aug 2019 at 03:16, Mark Wieder via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On 7/31/19 6:04 PM, Richard Gaskin via use-livecode wrote:
> > What works in Terminal generally works in LC's shell function.
>
> But not always. It's not a login shell, so the environment variables may
> well be different.
>
> David - did you brew-install hugo? If so then my guess is that you need
> to provide access to brew for the shell command. Maybe something like
>
> set the shellcommand to "/bin/bash"
> get shell("source ~/.bash_profile ; hugo server ")
>
> --
>   Mark Wieder
>   ahsoftware at gmail.com
>
> _______________________________________________
> 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