sendmail starts before rpc.statd and rpc.lockd
Gregory Neil Shapiro
gshapiro at freebsd.org
Sun Jun 8 19:45:04 PDT 2003
> Generally, sendmail uses flock() on the aliases file and related databases
> to ensure consistency. As far as I know, it's unrelated to redirection.
And for locking queue files.
> > Here is what Control-T does
> > load: 0.20 cmd: sendmail 292 [pause] 0.02u 0.04s 0% 2016k
>
> pause, eh? That doesn't sound like it's related the the NFS locking.
> Note that the errors you get for sendmail due to lack of locking result in
> a fairly clean exit, not a hang. Hangs are generally associated with DNS.
> Try a packet sniff?
No, it's sendmail:
void
queueup(e, announce, msync)
...
const int flags = O_CREAT|O_WRONLY|O_EXCL|O_EXLOCK;
...
/* get a locked tf file */
for (i = 0; i < 128; i++)
{
...
tfd = open(tf, flags, QueueFileMode);
...
if (lockfile(tfd, tf, NULL, LOCK_EX|LOCK_NB))
break;
...
(void) sleep(i % 32);
}
While trying to create a locked queue file, it sleeps in case a later
attempt will work.
More information about the freebsd-net
mailing list