[lkml]   [2010]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/7] notify userspace about time changes
On Fri, 17 Sep 2010, Alan Cox wrote:

> > Certain userspace applications (like "clock" desktop applets or cron) might
> > want to be notified when some other application changes the system time. It
> > might also be important for an application to be able to distinguish between
> > its own and somebody else's time changes.
> A program that cannot work out if it or someone else changed the time is
> very very broken indeed !
> > This patch implements a notification interface via eventfd mechanism. Proccess
> > wishing to be notified about time changes should create an eventfd and pass it
> > to time_change_notify() syscall along with notification options.
> This seems complete overkill and it doesn't really help applications much
> that I can see because of suspend/resume.
> What are your actual use cases ?
> Clocks apps don't care because they check the actual time so notice it
> shfited. Cron and anacron appear to contain the needed internal handling.
> Anything sleeping until a time occurs maybe ? In which case its a lot
> simpler and cleaner than events to provide a new itimer which wakes the
> process when the wall time hits the time specified in the timer.

We already have that. posix timers provide this.

The only case I can imagine where a notification might be interesting
is when something armed an absolute timer on CLOCK_REALTIME and time
is set backwards.



 \ /
  Last update: 2010-09-17 13:11    [W:0.117 / U:2.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site