fix --logto usage in cherokee

This commit is contained in:
roberto@mrspurr
2010-09-10 08:35:34 +02:00
parent 0f2fff31ee
commit c5877df60c
3 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import uwsgi
print "uWSGI version:", uwsgi.version
print "!!! uWSGI version:", uwsgi.version
def ciao():
print "modifica su /tmp"
+7 -5
View File
@@ -155,18 +155,20 @@ void logto(char *logfile) {
/* stdout */
if (dup2(fd, 1) < 0) {
uwsgi_error("dup2()");
exit(1);
if (fd != 1) {
if (dup2(fd, 1) < 0) {
uwsgi_error("dup2()");
exit(1);
}
close(fd);
}
/* stderr */
if (dup2(fd, 2) < 0) {
if (dup2(1, 2) < 0) {
uwsgi_error("dup2()");
exit(1);
}
close(fd);
}
-1
View File
@@ -86,7 +86,6 @@ void uwsgi_xml_config(struct wsgi_request *wsgi_req, struct option *long_options
}
else if (node->type == XML_ELEMENT_NODE) {
uwsgi_log("%s\n", node->name);
if (!strcmp((char *) node->name, "app")) {
uwsgi.xml_round2 = 1 ;
continue;