From: "Liu Wen" <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 8:10 PM
> hi,folks
> I am starting out reading Apache source code as a first step to learn
> Unix Environment and Network Programming. while can you give me some
> directions for reading?
This might sound crazy, but I would start with the httpd-2.0/server/mpm/prefork
directory, and review the basic outline of how prefork works and runs. Prefork
starts its life as one process that reviews the configuration, then forks like
crazy into tens to hundreds of copies that serve individual requests.
Since the raw network_io stuff is in a directory srclib/apr/network_io/unix/
it's pretty easy to read over the abstractions, and then look at exactly how
they were implemented. Better yet - if you want to understand BeOS, OS2,
Win32 or NetWare, just jump over to the appropriate parallel directory and
you can get a glimpse of the differences.
If you try using 1.3, you will fall into http_main.c, a monstrosity of code
that goes on for miles. The Apache 2.0 mpm architecture neatly broke things
up into parts, and the prefork flavor is probably the simplest to understand.
Bill