Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 May 2010, at 06:23, Chen Chien-Yu wrote:

> Hi William,
> 
> I reckon it should be mod_cgi, the CGI library I use is called "GNU CGI Library in C, v0.9.5" which has been maintained for many years. 
> 
> The function below is the way the CGI init and open the stream.
> 
> gcgiReturnType
> initCgi( )
> {
>     /* Dup stdout to gcgiOut */
>     gcgifd = dup(fileno(stdout));
>     gcgiOut = fdopen(gcgifd, "w");

Huh?  Why dup stdout?  And who manages closing it?

> Then, free the resource but I didn't see it close the file descriptor. It duplicate the standard output, is that the reason that don't have to close it? I've tried to close the stdout, stderr, gcgiOut, stdin, but that didn't work.

You should be able (but not normally required) to close your file descriptors in CGI.
But the dup introduced unexpected complexity.

If all that's from the cgi lib you're using, maybe you should put it to the maintainers of that,
and perhaps try and post somewhere a minimal CGI program that demonstrates your problem.

-- 
Nick Kew
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux