Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2000 15:40:05 -0600
From:      Warner Losh <imp@village.org>
To:        Karl Pielorz <kpielorz@tdx.co.uk>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Critical (or equivalent) section in Userland? 
Message-ID:  <200008172140.PAA14347@harmony.village.org>
In-Reply-To: Your message of "Thu, 17 Aug 2000 21:58:41 BST." <399C5201.5B6911CE@tdx.co.uk> 
References:  <399C5201.5B6911CE@tdx.co.uk>  <399BA212.A84240AE@tdx.co.uk> <200008171723.LAA12924@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <399C5201.5B6911CE@tdx.co.uk> Karl Pielorz writes:
: I don't think advisory locks will work - the other process is sendmail... I
: have to keep it from opening any of it's config files, whilst I 'rename' out
: of place the old ones (keeping any fd's to them intact) and rename in the new
: ones...

Don't fight sendmail.... :-)

: Killing / stopping the root sendmail doesn't work (as children making multiple
: deliveries still apparently open these  files at will) - and killing all of
: them isn't really an option either (as too many emails will be dropped, this
: means junking say, a 90% of the way through 3mb email delivery - only to have
: to resend/process it again from scratch).

Kill sendmail's root process.  That's the best you can do.  It won't
impact anything, it will prevent the reading of the queue files (and
the config files) and the children will just run with the old copies.
then you wait for all the children to die (with a reasonable
timeout).  Then you do your change, then restart sendmail.  That's the 
best you can hope for.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008172140.PAA14347>