wok annotate lighttpd/stuff/fastcgi_detach.patch @ rev 6502
Up: python-tempita to 0.5dev
author | Julien Rabier <taziden@slitaz.org> |
---|---|
date | Fri Oct 01 20:54:24 2010 +0000 (2010-10-01) |
parents | |
children |
rev | line source |
---|---|
pankso@1095 | 1 --- src/mod_fastcgi.c |
pankso@1095 | 2 +++ src/mod_fastcgi.c |
pankso@1095 | 3 +@@ -937,6 +937,24 @@ |
pankso@1095 | 4 + close(fcgi_fd); |
pankso@1095 | 5 + } |
pankso@1095 | 6 + |
pankso@1095 | 7 + close(STDERR_FILENO); |
pankso@1095 | 8 + if(srv->errorlog_mode == ERRORLOG_FILE) |
pankso@1095 | 9 + dup2(srv->errorlog_fd, STDERR_FILENO); |
pankso@1095 | 10 + else { |
pankso@1095 | 11 + int fd = open("/dev/null", O_RDWR); |
pankso@1095 | 12 + dup2(fd, STDERR_FILENO); |
pankso@1095 | 13 + close(fd); |
pankso@1095 | 14 + } |
pankso@1095 | 15 + |
pankso@1095 | 16 + close(STDOUT_FILENO); |
pankso@1095 | 17 + if(srv->errorlog_mode == ERRORLOG_FILE) |
pankso@1095 | 18 + dup2(srv->errorlog_fd, STDOUT_FILENO); |
pankso@1095 | 19 + else { |
pankso@1095 | 20 + int fd = open("/dev/null", O_RDWR); |
pankso@1095 | 21 + dup2(fd, STDOUT_FILENO); |
pankso@1095 | 22 + close(fd); |
pankso@1095 | 23 + } |
pankso@1095 | 24 + |
pankso@1095 | 25 + /* we don't need the client socket */ |
pankso@1095 | 26 + for (i = 3; i < 256; i++) { |
pankso@1095 | 27 + close(i); |