MCPcopy Index your code
hub / github.com/git/git / remove_tempfiles

Function remove_tempfiles

tempfile.c:68–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static void remove_tempfiles(int in_signal_handler)
69{
70 pid_t me = getpid();
71 volatile struct volatile_list_head *pos;
72
73 list_for_each(pos, &tempfile_list) {
74 struct tempfile *p = list_entry(pos, struct tempfile, list);
75
76 if (!is_tempfile_active(p) || p->owner != me)
77 continue;
78
79 if (p->fd >= 0)
80 close(p->fd);
81
82 if (in_signal_handler)
83 unlink(p->filename.buf);
84 else
85 unlink_or_warn(p->filename.buf);
86 remove_template_directory(p, in_signal_handler);
87 }
88}
89
90static void remove_tempfiles_on_exit(void)
91{

Callers 2

remove_tempfiles_on_exitFunction · 0.85

Calls 3

is_tempfile_activeFunction · 0.85
unlink_or_warnFunction · 0.85

Tested by

no test coverage detected