You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Rolf Hoppe <ro...@thieme.de> on 1998/02/26 16:58:24 UTC
mod_cgi/1876: Out of file descriptors on subsequent CGI runs
>Number: 1876
>Category: mod_cgi
>Synopsis: Out of file descriptors on subsequent CGI runs
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Feb 26 09:10:00 PST 1998
>Last-Modified:
>Originator: rolf.hoppe@thieme.de
>Organization:
apache
>Release: 1.3b3 Win95
>Environment:
Apache_1_3b3_win32.exe under Windows 95
>Description:
The file descriptor value is increased on every CGI script call by 3, causing out of fd's error after a few runs. No files can be opened any more.
>How-To-Repeat:
Test-C Program:
#include <io.h>
#include <stdio.h>
#include <fcntl.h>
main()
{
int fd;
printf ("Content-Type: TEXT/HTML\n\n");
fd = open ("??ANYFILE", O_RDONLY|O_BINARY);
printf ("fd is %d", fd);
close (fd);
return 0;
}
>Fix:
fd's 0 to 2 are not closed after CGI run%3
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]