| 857 | /* Cleanup actions to take when exiting. */ |
| 858 | |
| 859 | static void |
| 860 | exit_cleanup (void) |
| 861 | { |
| 862 | if (temphead) |
| 863 | { |
| 864 | /* Clean up any remaining temporary files in a critical section so |
| 865 | that a signal handler does not try to clean them too. */ |
| 866 | struct cs_status cs; |
| 867 | cs_enter (&cs); |
| 868 | cleanup (); |
| 869 | cs_leave (&cs); |
| 870 | } |
| 871 | |
| 872 | close_stdout (); |
| 873 | } |
| 874 | |
| 875 | /* Create a new temporary file, returning its newly allocated tempnode. |
| 876 | Store into *PFD the file descriptor open for writing. |