mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 21:51:30 +00:00
fix --logto usage in cherokee
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
import uwsgi
|
||||
|
||||
print "uWSGI version:", uwsgi.version
|
||||
print "!!! uWSGI version:", uwsgi.version
|
||||
|
||||
def ciao():
|
||||
print "modifica su /tmp"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user