On Wed, Jul 14, 2004 at 10:44:00AM -0600, David Bartmess wrote:
> "/usr/bin/spamc" with no parameters), it starts a brand new spamd process.

Well, how do you know it starts a brand new process?

> And WHY does it start a new spamd process? I thought spamd was a "server" of 
> sorts, and would just process each request from spamc as it came in???

I can't tell from your output (try "ps -ef" instead (depends on your
OS)), but what is likely happening is that when spamc connects to spamd,
spamd forks a process to deal with the request.  You can tell this
is what happens via the "ps -ef" because instead of pid 1 being the
parent, it'll be the pid of another spamd.  So it's not a "brand new"
spamd, but actually just a processing child which gets spawned off per
incoming connection.

In 3.0, when you launch spamd, it'll spawn X children (5 by default), so
you end up with 6 spamd processes.  When spamc connects, it'll "randomly"
get one of the children which will then process the message.  To make
it easier to figure out what is going on, we have the spamd children
change their process name to be obvious:

$ ps -ef | grep spamd
root      7460     1  0 Jul13 ?        00:00:00 /usr/bin/spamd -d -c -H -r 
/var/run/spamd.pid -m 2
root      5388  7460  1 07:53 ?        00:03:48 spamd child
root      7853  7460  0 08:00 ?        00:01:32 spamd child

-- 
Randomly Generated Tagline:
*/ \*       <-Tribbles having a swordfight

Attachment: pgpVKoHmEQyFX.pgp
Description: PGP signature

Reply via email to