www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David MacKenzie <...@pix.net>
Subject mod_cgi/9674: timeout select fails immediately
Date Fri, 01 Feb 2002 02:32:22 GMT

>Number:         9674
>Category:       mod_cgi
>Synopsis:       timeout select fails immediately
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Jan 31 18:40:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     djm@pix.net
>Release:        2.0.18 and CVS
>Organization:
apache
>Environment:
BSDI BSD/OS 4.3, gcc version 2.95.3 20010315 (release), x86
>Description:
When apache is waiting to read from a CGI program on its nonblocking pipe, it repeatedly gets
nothing and immediately retries.  The select() that's supposed to provide the timeout is returning
9 (EBADF).
>How-To-Repeat:

>Fix:
This fixes it, and is more efficient anwyay.

--- /homes/staff/djm/src/httpd-2.0/srclib/apr/file_io/unix/readwrite.c  Tue Nov 20 23:21:03
2001
+++ srclib/apr/file_io/unix/readwrite.c Thu Jan 31 21:24:57 2002
@@ -82,7 +83,7 @@
         else {
             tvptr = NULL;
         }
-        srv = select(FD_SETSIZE,
+        srv = select(file->filedes + 1,
             for_read ? &fdset : NULL,
             for_read ? NULL : &fdset,
             NULL,
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message