How to get output of piped process?

Imperatorn johan_forsberg_86 at hotmail.com
Sat Mar 6 08:24:07 UTC 2021


On Wednesday, 3 March 2021 at 20:43:54 UTC, Danny Arends wrote:
> On Monday, 22 February 2021 at 14:52:22 UTC, frame wrote:
>> On Monday, 22 February 2021 at 13:23:40 UTC, Danny Arends 
>> wrote:
>>
>>> https://github.com/DannyArends/DaNode/blob/master/danode/process.d
>>>
>>> Danny
>>
>> This example shows how easy it is to implement a non-blocking 
>> stream. Phobos knows this for sockets but not for pipes?
>
> Sockets seem to be more OS independent and are way more mature 
> in Phobos.
>
> Pipes seem to have been added as an afterthought in std.process 
> and std.stdio
>
> I had to add code for windows to deal with 
> non-blocking/buffering pipes, Linux uses fcntl/fileno to enable 
> non-blocking
>
> No idea why non-blocking pipes aren't in Phobos, but pipes 
> should not be an afterthought but a first class citizen imho

True, we should add this ☀️


More information about the Digitalmars-d-learn mailing list