Re: incron vs. files of uncertain existence

From: Matthew Miller <mattdm_at_mattdm.org>
Date: Sun, 1 Jul 2007 13:01:51 -0400

On Sun, Jul 01, 2007 at 06:41:49PM +0200, Lukas Jelinek - AIKEN wrote:
> I will try to answer.

Thanks. :)

> > ignored. Would it be possible to have a flag (X_IN_MIGHT_NOT_EXIST) which
> > would cause the following behavior?
> > 1) if path to watch exists, act normally
> > 2) if it doesn't exist, set up a watch for the parent directory
> > (recursively up to /, if necessary) which would look for the original
> > path to be created and at that point
> > a) delete the impled parent-directory watches
> > b) add the original watch as given in the config file.
> You aren't the first who requests such feature. But I think your idea
> might lead to relatively complicated implementation and high overhead in
> some cases. I have considered some different solution: to place
> non-existing paths into a queue and examine them periodically (e.g. each
> 15 secs by default). The discussion is still open and the final solution
> should comply the most wanted requirements.

That might be okay too, although it might be a bit unexpected/undesired from
this tool which people probably expect to avoid polling loops like that.

I suggest making this a flag to reduce potential overhead problems -- and to
reduce the chance of problems when you actually just typed the wrong thing.
The implementation might be a little complicated, but if one-time
complication in the tool removes oft-repeated and tricky complication in end
user scripts, that's still a win.

> > II) I was trying to make a script which acted on changes to /etc/group.
[...]
> > I worked around this by using "IN_CLOSE_WRITE,IN_ONESHOT" and then
[...]
> >
> I will copy you report into the BTS and try to analyze it. But please be
> patient. I'm currently really busy and can't dedicate much time to incron.

No problem -- I totally understand. I'm happy enough with my workaround for
this for now. Plus, if I weren't in the same boat, I would have sent patches
rather than just suggestions. :)

-- 
Matthew Miller           blocked-address          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>
Received on Sun Jul 01 2007 - 19:02:05 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST