File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848#include "abspath.h"
4949#include "path.h"
5050#include "tempfile.h"
51- #include "sigchain .h"
51+ #include "cleanup .h"
5252
5353static VOLATILE_LIST_HEAD (tempfile_list );
5454
@@ -87,18 +87,6 @@ static void remove_tempfiles(int in_signal_handler)
8787 }
8888}
8989
90- static void remove_tempfiles_on_exit (void )
91- {
92- remove_tempfiles (0 );
93- }
94-
95- static void remove_tempfiles_on_signal (int signo )
96- {
97- remove_tempfiles (1 );
98- sigchain_pop (signo );
99- raise (signo );
100- }
101-
10290static struct tempfile * new_tempfile (void )
10391{
10492 struct tempfile * tempfile = xmalloc (sizeof (* tempfile ));
@@ -116,8 +104,7 @@ static void activate_tempfile(struct tempfile *tempfile)
116104 static int initialized ;
117105
118106 if (!initialized ) {
119- sigchain_push_common (remove_tempfiles_on_signal );
120- atexit (remove_tempfiles_on_exit );
107+ cleanup_register (remove_tempfiles );
121108 initialized = 1 ;
122109 }
123110
You can’t perform that action at this time.
0 commit comments