[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Keep a shell open?
- From: Russell Haley <russ.haley@...>
- Date: Fri, 26 Jan 2018 12:53:39 -0800
On Fri, Jan 26, 2018 at 12:17 AM, nobody <firstname.lastname@example.org> wrote:
> On 2018-01-26 08:16, Russell Haley wrote:
>> Is it possible to open a shell in a coroutine and just interact with
>> it when I need it?
>> So in a coroutine, I would just open it and then read and write then
> As Dirk wrote, `io.popen` is read XOR write.
> If you're on some unix-y system & depending on what you're doing,
> lpty might work for you.
> There may be "simpler" ways to do that, but so far, for me, this was
> the "simplest" way to get non-blocking bidirectional communication going.
> -- nobody
Thanks, Dirk, Nobody. This was the answer I expected. The answer from
Josh is what I was hoping for. :)
>  http://tset.de/lpty/index.html
> (also via `luarocks install lpty`)
>  as in "not grabbing a PTY yadda yadda"
>  as in "least amount of thinking/code & sufficiently portable (*nix)"