[exim-dev] Suggested improvements to pid_file handling

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Chris Thompson
Datum:  
To: exim-dev
Betreff: [exim-dev] Suggested improvements to pid_file handling
Nigel tells us:

> The exim-dev@??? had an original brief of discussing changes to the
> development process. The initial phase of this has now completed, and
> so the list is changing function to be the primary forum for the
> discussion of exim development - for example this is the place to
> propose and discuss new features, bugs in exim's code or documentation
> etc.


... so, I hope this is now the appropriate place to post the following.

While trying to make robust start/stop scripts for Exim under Solaris
(high time to remove the sendmail packages!) I have become aware of some
deficiencies in Exim's pid_file handling. In particular, it does nothing
to invalidate the file contents when the daemon process terminates.

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.


-- 
Chris Thompson               University of Cambridge Computing Service,
Email: cet1@???    New Museums Site, Cambridge CB2 3QH,
Phone: +44 1223 334715       United Kingdom.