Permalink
Browse files

Close stderr and stdout at shutdown

  • Loading branch information...
1 parent 5d85a66 commit 847128cb7634abe011f64f2847da4cfc69b881ce @Yamagi Yamagi committed Jun 20, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/windows/system.c
View
8 src/windows/system.c
@@ -94,6 +94,10 @@ Sys_Error(char *error, ...)
/* shut down QHOST hooks if necessary */
DeinitConProc();
+ /* Close stdout and stderr */
+ fclose(stdout);
+ fclose(stderr);
+
exit(1);
}
@@ -117,6 +121,10 @@ Sys_Quit(void)
/* shut down QHOST hooks if necessary */
DeinitConProc();
+ /* Close stdout and stderr */
+ fclose(stdout);
+ fclose(stderr);
+
exit(0);
}

0 comments on commit 847128c

Please sign in to comment.