Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] [sympa-commits] sympa[9135] branches/sympa-cleanup/src/sbin/bulk.pl.in: [-bug] use PIDDIR for stderr file

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Guillaume Rousse <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] [sympa-commits] sympa[9135] branches/sympa-cleanup/src/sbin/bulk.pl.in: [-bug] use PIDDIR for stderr file
  • Date: Mon, 05 Aug 2013 14:25:15 +0200

Le 02/08/2013 05:03, IKEDA Soji a écrit :
Hi,

# During merge by David and Etienne, I personally had been working
# up merging -cleanup branch to -6.2. Now it has mostly finished.
# This doesn't aim at preciseness (in fact resulting code doesn't
# work), but helps for my understanding on Guillaume's work.
# So hereafter I may ask questions about some commits.

sympa[9135] branches/sympa-cleanup/src/sbin/bulk.pl.in: [-bug] use PIDDIR for
stderr file
sympa[9139] branches/sympa-cleanup/src/sbin/bulk.pl.in: [-bug] use PIDDIR for
stderr file

By 6.2a, STDERR of daemons were directed to files under tmpdir.
What is the reason to switch them to PIDDIR?

I feel it is undesirable that /var/run directory is filled by
temporary files.
It all depends of what class of temporary files you are referring to.

Most of them are throw-away files you don't ever need to recover, excepted for debugging purposes. For all of them, I progressively replaced manually-created temporary files with File::Temp instance. This ensure they will be automatically cleared as soon as they are no more used (no need for explicit cleaning process), and than you don't need to explicitely declare where you want to create those files in the configuration (perl deduces it from environment).

My initial intent was to get rid of all tmpdir configuration directive usage, and then mark it as deprecated. Then I stumbled upon those stderr output files, that are basically used to detect crashed process. They have to use a predictable naming pattern, to be identifiable by another process, so they can't use the same 'create-and-forget' logic. I could have kept tmpdir usage, but it would prevented configuration simplification. So I prefered to reuse PIDDIR constant (actually, a build-time configuration directive) here.

Bascally, those PID files or STDERR files are both temporary files of the same class: they normally exist only during the lifetime of a single process, and should be removed during normal process termination. If they are left behind, that's because a crash occured, and they should be removed on next process startup. So I think it makes sense to host both kind of files on /var/run/sympa, and to use a single build-time configuration directive for it. It could use a better name than PIDDIR, however, such as RUNDIR for instance.

And, cleanup process by sympa.pl does not work:
it targets tmpdir.
I don't have a clear idea of what you are talking of exactly, but I guess that's one of administrative tasks currently performed by sympa.pl, that ought to be moved to a distinct sympa_manager executable. It probably has to be fixed, or even dropped if no more useful.

--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31

Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.19+.

Top of Page