use fcron as default scheduler in Fedora?

Marcela Maslanova mmaslano at redhat.com
Mon Dec 8 13:20:37 UTC 2008


Patrice Dumas wrote:
> On Mon, Dec 08, 2008 at 01:43:14PM +0100, Marcela Maslanova wrote:
>> No, inotify is set to watch /etc/crontab even in case it's created after
>> start of daemon.
> 
> But without watching /etc with inotify, how do you do it? In my 
> experiments if a file doesn't exist, inotify_add_watch errors out.
> 
But inotify can watch files or directories. The watch is set on
/etc/crontab = SYSCRONTAB.
>> Yes, I set watch on /etc/cron.d/, so it's checking all changes in this
>> directory.
> 
> Indeed. Seems that I was fooled by the doc, IN_CLOSE_WRITE seems to also 
> watch for files closed inside a directory. I'll be able to simplify
> the fcron watch code, then, thanks.
> 
>> How many times is lstat touching the disc? I suppose you are lstat'ing,
>> only when you are creating the watch?
> 
> Yes. But the watch are recreated everytime the program is rerun, which
> is done everytime something changes. If the C program was integrated
> in a bigger C program instead of being launched from a shell script 
> (that also relaunches the configuration), previous watches could be 
> reused. In any case fcron is different from cronie, since (in the current 
> state) all the config is recreated even if only one file change. Maybe 
> cronie may have something more fine grained.
> 
In this case is using lstat ok.
> --
> Pat
> 


-- 
Marcela Mašláňová
BaseOS team Brno




More information about the fedora-devel-list mailing list