Use _Exit(0) on win32, always use _Exit(1) in log_error()
authorClifford Wolf <clifford@clifford.at>
Tue, 16 Aug 2016 07:36:49 +0000 (09:36 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 16 Aug 2016 07:38:54 +0000 (09:38 +0200)
kernel/driver.cc
kernel/log.cc

index 45cdd461dd06e4c82be89bd43dfcf88eb441af73..5cfc4171d5900c722fac376e1548376db15736f0 100644 (file)
@@ -509,6 +509,11 @@ int main(int argc, char **argv)
                free(hist_list);
 #endif
 
+       log_flush();
+#ifdef _WIN32
+       _Exit(0);
+#endif
+
        yosys_shutdown();
 
        return 0;
index 229b82746c856401c60c4a2f4a93ed73d3b1a69a..3f1d88819d38625a557ee90315ca16598ccae0be 100644 (file)
@@ -208,7 +208,7 @@ void logv_error(const char *format, va_list ap)
        log_files = backup_log_files;
        throw 0;
 #else
-       exit(1);
+       _Exit(1);
 #endif
 }