changeset 23814:3229c65a13c5

(dos_cleanup): Flush and fsync the termscript stream.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 03 Dec 1998 09:41:09 +0000
parents 198226daae3b
children fe9557bb7056
files src/dosfns.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dosfns.c	Thu Dec 03 09:39:41 1998 +0000
+++ b/src/dosfns.c	Thu Dec 03 09:41:09 1998 +0000
@@ -469,6 +469,13 @@
 #ifndef HAVE_X_WINDOWS
   restore_parent_vm_title ();
 #endif
+  /* Make sure the termscript file is committed, in case we are
+     crashing and some vital info was written there.  */
+  if (termscript)
+    {
+      fflush (termscript);
+      fsync (fileno (termscript));
+    }
 }
 
 /*