execute bash?

Puming via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 8 16:06:06 PDT 2016


On Friday, 8 April 2016 at 18:23:32 UTC, wobbles wrote:
> On Friday, 8 April 2016 at 16:07:13 UTC, Adam D. Ruppe wrote:
>> On Friday, 8 April 2016 at 15:20:09 UTC, Puming wrote:
>>> I tried with signal, but didn't catch SIGTTOU, it seems that 
>>> spawnProcess with `bash -i -c` will signal with SIGTTIN.
>>
>> Oh, surely because it wants to be interactive and is thus 
>> waiting for user input from the terminal..
>>
>> You might need to rig up a pseudo terminal that the bash can 
>> talk to. That's getting to be a pain though.
>
> You could run it through dexpect to get the effect of a pseudo 
> terminal.
>
> https://github.com/grogancolin/dexpect

Looked in the code, it is exacly what I need! Thanks.

Also it has spawnInPty :-)

combined with terminal.d, I think I might get a very handy shell 
now.


More information about the Digitalmars-d-learn mailing list