Detect that a child is waiting for input
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Sun Nov 20 13:03:57 PST 2016
On Sunday, 20 November 2016 at 12:21:19 UTC, unDEFER wrote:
> Hello!
> I'm using pipeProcess() to create a process:
>
> pipes = pipeProcess(["bash", "-c", BASH_COMMAND],
> Redirect.stdin | Redirect.stdout | Redirect.stderr);
>
> Is it possible detect that the child is waiting for input on
> stdin?
> I can't find decision even for C. I think it is impossible if
> the child uses unblocking reading. But I want to detect
> blocking reading.
If blocking is an error, you could close stdin and assuming the
process checks the error codes correctly....
More information about the Digitalmars-d
mailing list