Re: [exim-dev] Suggested improvements to pid_file handling

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Chris Thompson
CC: exim-dev
Sujet: Re: [exim-dev] Suggested improvements to pid_file handling
On Thu, 24 Feb 2005, Chris Thompson wrote:

> Although pid_file's have inevitable failure cases, it's possible to do
> a great deal better than this. I suggest
>
>   (a) Exim should try to unlink the file when the daemon exits: it's
>       not always the case that it can't do this after it has lost root
>       privilege;

>
>   (b) In case it can't, it should keep the file open, and on exit it
>       should truncate it to size zero if it can't unlink it.


I think the problem here is "when the daemon exits". I guess it has to
set up a signal handler to catch the KILL signal; I'm just wary about
signal handling because I know what a hairy area of system programming
it is. :-)

The keeping open option may be tricky/difficult after SIGHUP, when Exim
has re-executed itself, but still in the same process.

Would you like me to wishlist this issue?

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book