Challenge: who can background this shell command?

Dar Scott Consulting dsc at swcp.com
Thu Aug 1 12:01:40 EDT 2019


This is one approach I would explore. 

1. Create a window group of one custom window using Terminal. Set it up to run the process and have distinctive colors and title. And, most importantly, to run the process.

2. Use open process to launch, not Terminal, but the group. This is the part where I'm very unsure. Or maybe Terminal but somehow specify group. I do have a vague feeling that groups are apps, but I might be off in some parallel universe. If not then maybe "do ... as AppleScript".

The window would have the process output, logs and so on. Maybe.

I'm not sure what the best way to shut it down would be.

> On Aug 1, 2019, at 5:55 AM, David Bovill via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 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
> 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