diff options
| author | Sascha Schumann <sas@php.net> | 2003-09-02 16:16:12 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2003-09-02 16:16:12 +0000 |
| commit | b4a6c9fe755d9283d9a79b5e5101ba136dd30f7f (patch) | |
| tree | 9351800bcc6f939347c29d626599503620cd7870 /sapi/cgi | |
| parent | b1e3eaacafb3b3fc86c3a808a2e79ce5ddbeacfe (diff) | |
| download | php-git-b4a6c9fe755d9283d9a79b5e5101ba136dd30f7f.tar.gz | |
fetch fd correctly in fastcgi case
Diffstat (limited to 'sapi/cgi')
| -rw-r--r-- | sapi/cgi/cgi_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index cf1ef83e47..7a9bc5198c 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -491,8 +491,16 @@ static int php_cgi_startup(sapi_module_struct *sapi_module) static int sapi_cgi_get_fd(int *fd TSRMLS_DC) { +#if PHP_FASTCGI + FCGX_Request *request = (FCGX_Request *)SG(server_context); + + *fd = request->ipcFd; + if (*fd >= 0) return SUCCESS; + return FAILURE; +#else *fd = STDOUT_FILENO; return SUCCESS; +#endif } static int sapi_cgi_force_http_10(TSRMLS_D) |
