Date: Sun, 8 Jun 2003 19:45:02 -0700 From: Gregory Neil Shapiro <gshapiro@freebsd.org> To: Robert Watson <rwatson@freebsd.org> Cc: net@freebsd.org Subject: Re: sendmail starts before rpc.statd and rpc.lockd Message-ID: <20030609024501.GP90892@horsey.gshapiro.net> In-Reply-To: <Pine.NEB.3.96L.1030608215036.67632L-100000@fledge.watson.org> References: <20030609011331.14200.qmail@web13507.mail.yahoo.com> <Pine.NEB.3.96L.1030608215036.67632L-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030609024501.GP90892>