On Wed, 18 Jun 2014 16:15:40 -0400, David Nadlinger <c...@klickverbot.at> wrote:

On Wednesday, 18 June 2014 at 20:00:43 UTC, Justin Whear wrote:
For POSIX, seems like you could pass `File("/dev/null", "r")` for stdin
and `File("/dev/null", "w")`.  On Windows I believe you can use `File
("nul")` for the same effect.

Implementing this myself is of course always an option, yes, but I would have liked to avoid platform-dependent code.

Hm, I just checked the source, and there doesn't seem to be a better option indeed…


I think a mechanism to open a null stream in an OS independent way would be a good addition to std.stdio (or perhaps std.process?)

-Steve

Reply via email to