3 #include "sighandler.h"
6 SigHandler::SigHandler()
11 void SigHandler::signal_handler(int signum)
13 printf("SigHandler::signal_handler total files=%d\n",
15 for(int i = 0; i < files.total; i++)
17 printf("Closing %s\n", files.values[i]->asset->path);
18 files.values[i]->close_file(1);
22 void SigHandler::push_file(File *file)
24 // Check for duplicate
25 for(int i = 0; i < files.total; i++)
27 if(files.values[i] == file)
29 printf("SigHandler::push_file: file %s already on table.\n",
39 void SigHandler::pull_file(File *file)
41 for(int i = 0; i < files.total; i++)
43 if(files.values[i] == file)
45 files.remove_number(i);
49 printf("SigHandler::pull_file: file %s not on table.\n",