added a check on spooler unlink

This commit is contained in:
roberto@debian32
2011-08-05 06:53:43 +02:00
parent 55d8677a46
commit a94a8ea287
+3 -1
View File
@@ -195,7 +195,9 @@ int spool_request(char *filename, int rn, int core_id, char *buffer, int size, c
clear:
uwsgi_unlock(uwsgi.spooler_lock);
uwsgi_error("write()");
unlink(filename);
if (unlink(filename)) {
uwsgi_error("unlink()");
}
close(fd);
return 0;
}