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);
20 BC_Signals::signal_handler(signum);
23 void SigHandler::push_file(File *file)
25 // Check for duplicate
26 for(int i = 0; i < files.total; i++)
28 if(files.values[i] == file)
30 printf("SigHandler::push_file: file %s already on table.\n",
40 void SigHandler::pull_file(File *file)
42 for(int i = 0; i < files.total; i++)
44 if(files.values[i] == file)
46 files.remove_number(i);
50 printf("SigHandler::pull_file: file %s not on table.\n",