On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote:

This applications will be called by a second application:
import std;
void main() {
    auto p = pipeShell("a", Redirect.all);
    p.stdin.writeln("e1");
    p.stdin.writeln("10");
    p.stdin.writeln("e2");
    p.stdin.writeln("9");
    p.stdin.flush();
    p.stdout.readln();
}

In application a.d the first "while round" will succeed as expected. But in the second "while round" the readln does not wait until there is an input but gets an empty string. The to!int will therefore throw an exception.

Why does the readln returns an empty string in the second run and does not wait on an input?


probably cuz no second "send round" in b.d.
or u mean second half-round "e2,9"?

Reply via email to