From: Eli Zaretskii Date: Thu, 3 Dec 1998 09:41:09 +0000 (+0000) Subject: (dos_cleanup): Flush and fsync the termscript stream. X-Git-Tag: emacs-20.4~1135 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f855d6452fbff508a7b022350564a9f7955f7e9;p=emacs.git (dos_cleanup): Flush and fsync the termscript stream. --- diff --git a/src/dosfns.c b/src/dosfns.c index b1ba6063a37..d0f5f18dd01 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -469,6 +469,13 @@ dos_cleanup (void) #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)); + } } /*