Re: Bug#4256: The gpilotd daemon shuts down unexpectedly

On Tue, 28 Dec 1999, Eskil Heyn Olsen wrote:

> It just went down. The event had an alarm at 1900, and I had left gnomecal
> running. As gnomecal popped up the alarm box, gpilotd exited with SIGALRM.

Geh... I think I've found the problem. Creating a calendar also intializes
its alarms. Thus setitimer(...) is called for all entries with alarms, but
no handlers for the signal is set up.

So I either set up a handler, or more properly, I create the calendar
without setting up the alarms. 

For the gnomecal people:
The problem is that calendar.c:calendar_new calls calendar_init_alarms,
thereby causing SIGALRMs to be sent to gpilotd.

Since pilot-link uses alarm for some watchdog thing (though I'm not sure
it's used normally), I'll add a calendar_new_without_alarms, which
contains the code of calendar_new execpt the init_alarms. To remove code
duping, I'll let calendar_new call calendar_new_without_alarms and then
the init.

I'd prefer let calendar_new do the alarmless init and then
calendar_new_with_alarm, but then I'd have to make a lot of changes around

On the other hand, some places calendar_new is used to create a temporary
calendar, surely having these setup more setitimer calls is unessecary.

Opinions or the usual silence ? (in which case I'll go ahead and do The
Right Thing).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]