Re: [squid-users] squid source problem

From: fatemeh bishemar <bishomar@dont-contact.us>
Date: Wed, 22 Aug 2001 08:16:08 -0700 (PDT)

Thanks a lot for your beautifull answer, but how one
process ( child
process) can process these two much requests that
arrives from client in a
good speed, and how the requests don't made mistakes
with each other?

Robert Collins wrote:

  On 21 Aug 2001 23:19:31 -0700, fatemeh bishemar
wrote:
> hi,
> I read squid source,but I have some problems.
> my understandig is that:

  nearly right.

  Replace

> "when squid finished initialization(that includes
> regestering handler for
> each fd for i/o events or read/write from/to
socket)
> ,if it run as a daemon in
> background it fork and create a child process that
> continue the rest of the
> process and parent process wait until child
process
> exit,and then fork
> another child and its go on.

  with

  "when squid is executed it closes all fds, so as to
run as a daemon in
  the background. It then forks and creates a child
process that continues
  the rest of the process and the parent process waits
until the child
  process exists, and then forks another child and so
on.

  The child initialises the software including
registering a handler for
  each fd for io events or read/write from/to socket.

  and the rest is correct.

> after that child process call eventrun and in taht
> functions E link list of the
> event will be scanned and the event that its the
time
> to run will be run and
> they remove from link list.until arriving to an
event
> that its time feild is
> greater than current time. then its called
nextevent
> function that return the
> time of the next event then squid pass the time -
as
> timeout- to the
> comm_select function. in this function select
system
> call will be activated
> on all fds(for read write or close)if one fd is
ready
> its related handler will
> be called after time out ocurred its call eventrun
> function and go on
> until an error occured or shutdown requeted or ...
,
> and then the child
> exit."

> first,Is it true ?. if no, what is the machanism?
  Nearly. see above,

> second,if yes,What happens if during execution of
the
> child process
> another request arrives from a client? Which of
the
> parent and child will
> reply the request?

  The child - the parent never calls bind().
  Rob

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
Received on Wed Aug 22 2001 - 09:16:09 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:01:53 MST