file_deleter logs strerror(errno) if unable to remove a result file.

svn path=/trunk/boinc/; revision=4677
This commit is contained in:
Bruce Allen 2004-11-29 09:47:48 +00:00
parent 64886ead77
commit df0f066a69
2 changed files with 4 additions and 2 deletions

View File

@ -20324,6 +20324,7 @@ Bruce 2004-11-29
to the file deleter. This are useful to implement <no_delete/>
for all input or output files respectively.
- Documented <no_delete/> file tag.
- file_deleter logs strerror(errno) if unable to remove a result file.
sched/
file_deleter.C
doc/

View File

@ -26,6 +26,7 @@ static volatile const char *BOINCrcsid="$Id$";
#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <errno.h>
#include "boinc_db.h"
#include "parse.h"
@ -111,8 +112,8 @@ int result_delete_files(RESULT& result) {
retval = unlink(pathname);
++count_deleted;
log_messages.printf(SCHED_MSG_LOG::NORMAL,
"[%s] unlinked %s; retval %d\n",
result.name, filename, retval
"[%s] unlinked %s; retval %d %s\n",
result.name, filename, retval, (retval && errno)?strerror(errno):""
);
}
}