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: IKEDA Soji <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, 5 Aug 2013 22:52:14 +0900

Hi,

On Mon, 05 Aug 2013 14:25:15 +0200
Guillaume Rousse <address@concealed> wrote:

> 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.

I forgot to say: These files were used by
Sympa::Tools::Daemon::send_crash_report(). I improved this function
a bit on 6.2-branch because I thought it is useful to investigate
crashes.

> 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.

It's in sense that PID files will be removed when the daemons
stopeed normally.

> > 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.

I agree. It would be done by other process such as a task
controlled by task_manager.pl.

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


--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/




Archive powered by MHonArc 2.6.19+.

Top of Page