On 5/10/12, Minas <[email protected]> wrote:
> But sometimes (at about 3-5 runs), I get a segmentation fault!
Long shot but: I've had crashes before when using write calls in an
app that doesn't spawn a console window. What happened was
stdout/stderr wasn't opened, so to fix that I'd have to do this before
any calls to write() functions:
if (!GetConsoleWindow()) {
stdout.open("stdout.log", "w");
stderr.open("stderr.log", "w");
}
GetConsoleWindow is a win32 function, but there's probably something
similar on posix though.