Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54914 invoked by uid 1010); 25 May 2004 06:12:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54890 invoked by uid 1007); 25 May 2004 06:12:19 -0000 Message-ID: <20040525061219.54876.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: "Pan qingfeng" Date: Tue, 25 May 2004 14:12:30 +0800 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 218.19.142.241 Subject: [PATCH][2nd POST]sapi fastcgi check a new environment PHP_FCGI_NOFORK From: pqf@tebie.com ("Pan qingfeng") It's a simple modification, and will not conflict with the previous version. Please reconsider it... If the environment PHP_FCGI_NOFORK is set, then now useless fastcgi processs is spawned. I make this patch is because my Apache2 module(http://fastcgi.coremail.cn) work on UNIX domain socket, and don't need PHP to run with "-b IP:Port" mode as external fastcgi server any more, so the extra process spawnning is not necessary. I think it's not the right time to summit the Apache2 module source to PHP, because the PHP5 is releaseing in a month or two, but I hope this patch can be committed to the PHP5 cvs branch, because it's really very simple, but reduse the process number of fastcgi server. I hope I can summit the Apache fastcgi module to PHP5.1 while the branche start. Please give me some replys, thanks :-) Index: cgi_main.c =================================================================== RCS file: /repository/php-src/sapi/cgi/cgi_main.c,v retrieving revision 1.254 diff -u -r1.254 cgi_main.c --- cgi_main.c 6 May 2004 15:41:59 -0000 1.254 +++ cgi_main.c 25 May 2004 06:00:18 -0000 @@ -1182,7 +1182,7 @@ } } - if( children ) { + if( !getenv("PHP_FCGI_NOFORK") && children ) { int running = 0; pid_t pid;