scheduler: remove lock file when scheduler caught SIGTERM

svn path=/trunk/boinc/; revision=25402
This commit is contained in:
Bernd Machenschalk 2012-03-12 09:10:42 +00:00
parent 0d04385623
commit 731c551284
3 changed files with 10 additions and 0 deletions

View File

@ -2540,3 +2540,10 @@ David 10 Mar 2012
vda/
stats.cpp,h (new)
Bernd 12 Mar 2012
- scheduler: remove lock file when scheduler caught SIGTERM
sched/
handle_request.h
sched_main.cpp

View File

@ -20,3 +20,5 @@
extern void handle_request(
FILE* fin, FILE* fout, char* code_sign_key
);
extern void unlock_sched(void);

View File

@ -210,6 +210,7 @@ void sigterm_handler(int /*signo*/) {
log_messages.printf(MSG_CRITICAL,
"Caught SIGTERM (sent by Apache); exiting\n"
);
unlock_sched();
fflush((FILE*)NULL);
exit(1);
return;