Mercurial > hg > octave-lyh
changeset 318:1412ea9fc828
[project @ 1994-01-28 06:33:29 by jwe]
author | jwe |
---|---|
date | Fri, 28 Jan 1994 06:33:29 +0000 |
parents | 712cc23447fc |
children | 42fe4794ded9 |
files | src/octave.cc |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -63,7 +63,7 @@ #include "file-io.h" #include "sysdep.h" -#ifdef sun +#if !defined (HAVE_ATEXIT) && defined (HAVE_ON_EXIT) extern "C" { int on_exit (); } #define atexit on_exit #endif @@ -354,6 +354,8 @@ close_files (); + cleanup_tmp_files (); + if (!quitting_gracefully && (interactive || forced_interactive)) cout << "\n"; @@ -436,8 +438,12 @@ } } -// Make sure we clean up when we exit. +#if defined (HAVE_ATEXIT) || (HAVE_ON_EXIT) +// Make sure we clean up when we exit. If we don't have atexit or +// on_exit, we're going to leave some junk files around if we exit +// abnormally. atexit (cleanup_tmp_files); +#endif initialize_history ();