On Wed, 14 May 2003, Chris Knipe wrote:
> USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
> exim exim-4.1 22555 1 tcp4 192.168.1.1:25
> 195.92.249.251:57206
> exim exim-4.1 22555 2 tcp4 192.168.1.1:25
> 195.92.249.251:57206
>
> The 1 and 2 would have been the file descriptors... And funny enough, once
> again the same scenario - duplicate connection...
Aha! That's OK. Exim uses two file descriptors for each connection - one
for reading and one for writing. It appears that your OS displays both
of them. But there is only one connection. So this output is all a red
herring.
> Erm, it still doesn't count the current connections right in the log files?
That may be a problem. I've looked at the code, and it seems simple
enough. When the daemon successfully creates a subprocess, it remembers
the pid and ups the count. When it reaps the completed subprocess, it
decreases the count.
However, the outputting of the log line occurs in the subprocess, and
there is therefore the possibility of a race. The count that the
subprocess has is the value when it was created - the value that the
daemon has could change before the suprocess logs its copy. In this
case, the effect is to print an out-of-date value, but it shouldn't
affect the use of the count for controlling the total, etc.
> John Jetmore posted a reply earlier with basically the same scenario - he's
> connection count is just alot more than mine...
Yes, but he was talking about smail 3. There is no code in Exim from
smail. It was all completely rewritten.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.