aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-08-16 09:36:49 +0200
committerClifford Wolf <clifford@clifford.at>2016-08-16 09:38:54 +0200
commit5767e4bc4db8d70bd02945769b6784618f7d003a (patch)
tree248f07d7b9f51ded13dfcf5ffad2767064d5f3f0
parent5531bd757808499c23d082c4aa3566cfd5e5ec70 (diff)
downloadyosys-5767e4bc4db8d70bd02945769b6784618f7d003a.tar.gz
yosys-5767e4bc4db8d70bd02945769b6784618f7d003a.tar.bz2
yosys-5767e4bc4db8d70bd02945769b6784618f7d003a.zip
Use _Exit(0) on win32, always use _Exit(1) in log_error()
-rw-r--r--kernel/driver.cc5
-rw-r--r--kernel/log.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc
index 45cdd461d..5cfc4171d 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -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;
diff --git a/kernel/log.cc b/kernel/log.cc
index 229b82746..3f1d88819 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -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
}