mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
Don't use `atexit'.
* src/files.c (obstack_save): New function. (done): Rename as... (output_files): this. Use `obstack_save'. * src/main.c (main): Don't use `atexit' to register `done', since it no longer has to remove tmp files, just call `output_files' when there are no errors.
This commit is contained in:
@@ -50,9 +50,6 @@ main (int argc, char *argv[])
|
||||
lineno = 0;
|
||||
getargs (argc, argv);
|
||||
|
||||
/* Be ready to clean up if we exit. */
|
||||
atexit (done);
|
||||
|
||||
open_files ();
|
||||
|
||||
/* Read the input. Copy some parts of it to FGUARD, FACTION, FTABLE
|
||||
@@ -93,6 +90,9 @@ main (int argc, char *argv[])
|
||||
free_nullable ();
|
||||
free_derives ();
|
||||
|
||||
if (!complain_message_count)
|
||||
output_files ();
|
||||
|
||||
exit (complain_message_count ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user