http://d.puremagic.com/issues/show_bug.cgi?id=10364
--- Comment #1 from Gary Willoughby <s...@kalekold.net> 2013-06-15 12:20:52 PDT --- Another example of maybe the same bug? This also crashes but does so silently with no system.log entry or crash dump. import core.sys.posix.sys.stat; import core.sys.posix.unistd; import std.c.stdio; import std.c.stdlib; import std.process; import std.stdio; import std.string; import std.file; import std.datetime; class Logger { private File _logFile; public this(string logFile) { this._logFile = File(logFile, "a"); } public void info(string, A...)(string text, A args) { this._logFile.writefln(format(text, args)); } } int main(string[] args) { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((core.sys.posix.unistd.chdir("/")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); auto logger = new Logger("/Users/gary/Desktop/test.log"); // Crash! logger.info("Reading file"); string configFileContents = readText("/etc/hosts"); // Never executes! logger.info(configFileContents); return 0; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------