]> granicus.if.org Git - php/commitdiff
Added PHP_FCGI_BACKLOG, overrides the default listen backlog
authorArnaud Le Blanc <arnaud.lb@gmail.com>
Sun, 28 Apr 2013 14:25:30 +0000 (16:25 +0200)
committerArnaud Le Blanc <arnaud.lb@gmail.com>
Sat, 29 Jun 2013 15:52:04 +0000 (17:52 +0200)
sapi/cgi/cgi_main.c

index 9e6b74ac6164e4dafdd011ae4feff10d8650950a..4c78fcafec08ff819741788595213989e475101d 100644 (file)
@@ -1955,7 +1955,11 @@ consult the installation file that came with this distribution, or visit \n\
        }
 
        if (bindpath) {
-               fcgi_fd = fcgi_listen(bindpath, 128);
+               int backlog = 128;
+               if (getenv("PHP_FCGI_BACKLOG")) {
+                       backlog = atoi(getenv("PHP_FCGI_BACKLOG"));
+               }
+               fcgi_fd = fcgi_listen(bindpath, backlog);
                if (fcgi_fd < 0) {
                        fprintf(stderr, "Couldn't create FastCGI listen socket on port %s\n", bindpath);
 #ifdef ZTS