<p dir="ltr">On 26 Oct 2014 08:05, "Mike via Digitalmars-d" <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br>
><br>
> On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote:<br>
><br>
>> I tried this on my Linux desktop, and while everything compiled and linked without errors, it resulted in a segmentation fault at runtime.  But where I have failed, others may succeed.  I tested with LDC and GDC, but not DMD.<br>
><br>
><br>
> It does work, but for some reason if I replace the printf statement below with D's writeln, I get a segmentation fault.  I don't know why.  Anywhere here's a trivial example to illustrate the idea.<br>
></p>
<p dir="ltr">The std.stdio module has a shared static this which initialises the File wrapper around C's stdin, stdout, and stderr.  I would first assume that it segv's because the wrapper or internal pointer is null.</p>
<p dir="ltr">Iain.<br>
</p>