On Thu, 12 Sep 2002 07:34:35 -0700 (PDT)
sorin <s_gherman_at_yahoo.com> wrote:
> Hi,
Hello!
> Is anybody working on an "alarm" utility? Something that can be used
> in gpe-calendar, and in the gpe-clock?
> Or is there something already? What are you guys using for an alarm?
Oh oh ... dangerous question (at least for me)...
I think I am supposed to work on it. I have written rtcd and gpe-alarm
but to be honest they are not the best solution to the problem. I had
several thoughts about it but have not yet come up with a better
solution.
We have the followin restrictions:
1. We only have _one_ RTC alarm.
2. We have potentially several users using the alarm service.
3. We have to have some means of notification.
4. Alarms should be persistent even after reboots.
The 1st restriction leads directly to a central service application that
manages the whole sum of alarms from all users and applications (2.) and
program the timely next alarm into the RTC. Thus this central
application will also be the application that watches the RTC and gets
notified upon alarm time arrival and after that has to notify (3.) a
user application.
The forward way, i.e. from application to service daemon and to RTC, is
quite straight forward. An application simply contacts the daemon, for
example using Unix Domain socket, and requests the corresponding alarm.
After that the socket is closed again.
The more dificult part is getting back from the daemon to the
application. The daemon needs to notify the process that registered the
alarm. Here we get several new problems:
1. The process that registered the alarm might not be running anymore,
i.e. simply signalling the PID does not work. We could now also store
the application name along with the alarm data into the daemon. But this
leads to
2. If the calling process does not longer exists we could start a new
instance of it using xsi. But what if the calling process was running
with a different UID? Or in other words, you logged in as user XY and
registered an alarm then log out. After that user YZ logs in and the
alarm goes off. What does happen now? Assume the alarm came from
gpe-calendar. Should the RTC daemon now spawn the calendar application
as user XY and present user YZ with the application window?
3. Doing alarm notification using signals is not very nice; signals are
evil :( It took me quite some time to get gpe-alarm to behave properly.
Maybe setting of an X resource that apps can query might be an option;
or an X-event?
So, those are basically my current problems that I right now don't know
how to solve properly. If anyone has a good idea on it, please let me
know and I'll do that ASAP!
> Thanks in advance,
> /sorin gherman
CU
nils faerber
-- kernel concepts Tel: +49-271-771091-12 Dreisbachstr. 24 Fax: +49-271-771091-19 D-57250 Netphen D1 : +49-170-2729106 --Received on Thu Sep 12 2002 - 15:26:08 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:01 EDT