httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: pfopen: why fopen and not open?
Date Sat, 06 Dec 1997 18:06:07 GMT
Because you have to start somewhere when building an application, and FILE
* is a reasonable place to start?  You'll notice that I mention it has to
be completely replaced in 2.0. 

Also, on reasonable systems, FILE * uses mmap() so it's only one copy to
read.

You'll also notice that send_fd_length is only used when mmap() fails. 
And by a few modules. 

Dean

On Sat, 6 Dec 1997, Igor Tatarinov wrote:

> To be more specific: in http_protocol::send_fd_length(), fread() is used
> to read the file, why fread?
> 
> Dean Gaudet wrote:
> > 
> > It uses both.  Look at buff.c.
> > 
> > Dean
> > 
> > On Sat, 6 Dec 1997, Igor Tatarinov wrote:
> > 
> > > I was just wondering why Apache uses the stdio interface not the
> > > standard UNIX open/read/write interface.
> > >
> > > As I understand, stdio invloves extra data copying to an intermediate
> > > buffer.
> > >
> > > igor
> > >
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Igor Tatarinov, graduate student, Computer Science Dept, NDSU
> e-mail: tatarino@prairie.nodak.edu   or   itat@acm.org
> http://www.cs.ndsu.nodak.edu/~tatarino
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 


Mime
View raw message