Spawning a console in Windows (similar to forkpty on linux)

wobbles via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 9 05:25:31 PDT 2015


On Saturday, 9 May 2015 at 12:16:52 UTC, Rikki Cattermole wrote:
> On 10/05/2015 12:13 a.m., wobbles wrote:
>> This isn't specifically a D question, but seeing as it's for a 
>> D library
>> I figure it can go here :)
>>
>> On Windows, I want to be able to spawn a console and then 
>> interact with
>> its stdin/out asynchronously, similar to how forkpty [1] works 
>> on linux.
>>
>> I'm improving my dexpect library [2] to work with windows 
>> machines and
>> this bit has me stumped. There doesnt seem to be much info 
>> about it that
>> I can find (though my google-fu mightn't be good enough!!)
>>
>> I'm sure theres someone here who knows something?
>>
>> Thanks!
>>
>> [1] http://linux.die.net/man/3/forkpty
>> [2] https://github.com/grogancolin/dexpect
>
> Did you try creating a new process which is cmd?
> Because std.process should be able to handle the IO part.

I have, but they all block i/o and so I cant continually read 
from its output :/


More information about the Digitalmars-d-learn mailing list