# HG changeset patch # User Eli Zaretskii # Date 912678069 0 # Node ID 3229c65a13c550a5e409183462408abf77c4c8f8 # Parent 198226daae3b5ab1b449981517227e77612d0bc8 (dos_cleanup): Flush and fsync the termscript stream. diff -r 198226daae3b -r 3229c65a13c5 src/dosfns.c --- 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)); + } } /*