stdout redirect

Andrea Fontana nospam at example.com
Wed Apr 11 06:00:44 PDT 2012


On Wednesday, 11 April 2012 at 12:46:30 UTC, Andrea Fontana wrote:
> How can I redirect stdout / stderr to file (from D not shell)?

Self-reply:

It works using std.c way:

import std.cstream;
std.c.stdio.freopen(args[4].ptr, "w+", dout.file);
std.c.stdio.freopen(args[4].ptr, "w+", derr.file);




More information about the Digitalmars-d-learn mailing list