Harald Dunkel <harri@afaics.de> wrote:
> Hi folks,
>
> I have to run several pflogd in parallel. To make pkill (i.e.
> newsyslog) work it seems to be necessary to create hard links
> pflogd1, pflogd2 etc., pointing to /sbin/pflogd. Soft links
> don't work, because they don't show up in the process table.
> This introduces new problems on the next upgrade of pflogd.
> Its unreliable and error-prone. (I lost 2 weeks of logfiles
> due to this.)
>
> Would it be possible for pflogd to support a command line
> option -p /var/run/mypflogdinstance.pid, as common for other
> daemons? Without "-p" no pid file has to be written, as it is
> now.
>
> I know this flag was present in ancient OpenBSD versions,
> but I never understood why such a reliable feature had
> been dropped in advance of the undependable pkill.
pid files don't really work any better than pkill, so we've removed
support all over the place.
pid files are a flawed mechanism. Use of a stale pid file can impact
another process which has reused the pid, which is not that different
from pkill identifing the wrong program. At least with pkill, you can
aim more carefully.
We've put some work into making programs not damage their argv. If you
provide a strong set of arguments to the programs you start, you may be
able to pkill with a more fullsize pattern, increasing the accuracy.
It is all quite unsatisfying. It would be better if a a parent
kept reference to the child, but that can also be unsatisfactory
when it creates too much process closeness.
No comments:
Post a Comment