MCPcopy Create free account
hub / github.com/coreutils/coreutils / exit_cleanup

Function exit_cleanup

src/sort.c:859–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

857/* Cleanup actions to take when exiting. */
858
859static void
860exit_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.

Callers

nothing calls this directly

Calls 3

cs_enterFunction · 0.85
cs_leaveFunction · 0.85
cleanupFunction · 0.70

Tested by

no test coverage detected