httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Re: B85 uploaded: close-on-exec on file descriptors
Date Tue, 02 May 1995 11:53:00 GMT
> > I've uploaded B85-cloexec.txt which sets close-on-exec on the access.log
> > and socket file descriptors. With this patch applied, I find the following
> > file descriptors open on calling a CGI script:
> > 0  socket to client
>             ^^
> I assume you mean "from", or am I missing something ?

I suppose so, yes. It is a bi-directional connection, but the script is only
supposed to read from it.

> > 1  fifo
> > 2  error_log
> > 3  error_log
> 
> Why are 2 & 3 the same ?

Because httpd fopen's the error log, and then dup2()'s a copy of the error-log
file descriptor as file descriptor 2 if it isn't already fd 2.

 David.

Mime
View raw message