fixed spooler with chdir

This commit is contained in:
roberto@quantal64
2012-06-08 20:55:15 +02:00
parent e775b18fd5
commit b40cdfbe66
+6
View File
@@ -548,6 +548,12 @@ void spooler_manage_task(struct uwsgi_spooler *uspool, char *dir, char *task) {
uwsgi_protected_close(spool_fd);
uspool->running = 0;
if (chdir(dir)) {
uwsgi_error("chdir()");
uwsgi_log("[spooler] something horrible happened to the spooler. Better to kill it.\n");
exit(1);
}
if (!callable_found) {
uwsgi_log("unable to find the spooler function, have you loaded it into the spooler process ?\n");
}