how to pass stderr to core.stdc.stdio.fileno

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 17 08:08:11 PST 2017


On Friday, 17 February 2017 at 16:02:39 UTC, berni wrote:
>> int no = fileno(stderr);

Try

fileno(core.stdc.stdio.stderr);

to force it to use the C stderr object instead of the D one.

Alternatively, fileno(stderr.getFP()) should do it too.
http://dpldocs.info/experimental-docs/std.stdio.File.getFP.html


More information about the Digitalmars-d-learn mailing list