[RFC] XDG_RUNTIME_DIR
Lennart Poettering
mzkqt at 0pointer.de
Tue Nov 9 14:55:29 PST 2010
On Tue, 09.11.10 04:20, Lennart Poettering (mzkqt at 0pointer.de) wrote:
>
> On Sun, 07.11.10 11:26, Ryan Lortie (desrt at desrt.ca) wrote:
>
> > > What if the system resumes from suspend after 12 hours and the OS job to clean
> > > the directory is executed before any of the apps had a chance to update mtime?
> >
> > Good point. We could specify 6/12 hours as measured by the monotonic
> > clock except that file timestamps are in real time. This is tricky...
>
> Hmm, I'd suggest adding to this spec the rule that files should not be
> deleted if the wallclock time was changed less than 5mins of monotonic
> time ago, or the system was resumed less than 5mins of monotonic time
> ago. This should fix your problem, right?
BTW: the wallclock time changing and the suspending issue is actually
the same problem. Suspending can be considered nothing but a big jump of
the wallclock time in respect to the monotonic time.
And pretty soon we'll be able to get a POLLPRI event on a timerfd() on
Linux if the wallclock time changes relative to the monotonic clock, if
this is first enabled. With that in place this behaviour is trivial to
implement.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the xdg
mailing list