Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 2001 12:48:19 -0800
From:      "Jonathan Graehl" <jonathan@graehl.org>
To:        <freebsd-arch@freebsd.org>
Subject:   modifying config files for a running daemon
Message-ID:  <NCBBLOALCKKINBNNEDDLMEECDLAA.jonathan@graehl.org>
In-Reply-To: <20010220105723.C85542@prism.flugsvamp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Is there any way to be sure of receiving a change notification only after the
writer has closed the file?

I suppose that such a notification would not obviate flock(2)ing between editors
(a quick glance at contrib/nvi shows that vi uses flock) and daemons (although,
e.g. inetd simply opens the file without locking)

-JG

> It would be fairly trivial to monitor a configuration file with kevent,
> which would generate a notice whenever the file is changed/copied/renamed,
> etc.  I believe that John-Mark Gurney had patches somewhere to implement
> exactly this for inetd.
>
> The problem is that under our current model, the administrators do not
> expect writes to the file to take immediate effect, and this immediately
> breaks POLA.  So while it could be done, it may not be a good idea.  At
> the very least, I would argue that it should be hidden behind a flag option.
> --
> Jonathan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NCBBLOALCKKINBNNEDDLMEECDLAA.jonathan>