On 6/11/13 12:04 AM, David Nadlinger wrote:
On Tuesday, 11 June 2013 at 04:02:59 UTC, Andrei Alexandrescu wrote:
The test program is flawed; writeln() writes to stdout, and the
redirection is to stdin.

Wouldn't stdin be fd 0?

David

Oh indeed my bad. But the test is still flawed. Consider:

import std.stdio;
int main()
{
    return printf("test\n") < 0;
}

This should return 1 if printf fails. It succeeds for 1</dev/null.


Andrei

Reply via email to