The garbage collector is closing stdout on powerpc-linux-gnu...

Matt Brandt justmattb at walkingdog.net
Mon Mar 12 15:48:57 PDT 2007


The following trivial program shows the problem:
----------
import std.stdio;
import std.gc;

void	main(char[][] args)
{
	writefln("before full_collect");
	fullCollect();
	writefln("after full_collect");
}
-----------------
when this is run the first message prints, but the second message doesn't. I've verified that the file descriptor (2) is actually closed by substituting a direct call to C write for the output statements as well. I'm running a gdc 0.22/gcc-4.1.0 cross compiler (on x86).

Needless to say, it makes debugging difficult when output goes away...

Any ideas?

Matt



More information about the D.gnu mailing list