Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 1996 18:20:25 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@FreeBSD.org, mihoko@pa.yokogawa.co.jp
Cc:        taketomi@pa.yokogawa.co.jp
Subject:   Re: a problem of setitimer()
Message-ID:  <199605100820.SAA03647@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I'm running FreeBSD-2.1.0R.

>I found the problem of realitexpire() [sys/kern/kern_time.c].

>If the time is late, the process which uses the system call
>setitimer() can't get SIGALARM until the next timeout has come.

>For example, the current time is 7:30 and the next timeout is 7:32,
>then the time is changed to 7:15.
>The process gets SIGALARM at 7:32, not at 7:17.

>I suggest following coding.
>How about?

I think the correct fix is to adjust all the timers in settimeofday().
It now says /* WHAT DO WE DO ABOUT PENDING REAL-TIME TIMEOUTS??? */
and does nothing.

Another fix is to never use settimeofday() :-).  You should try to use
it only immediately after booting.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605100820.SAA03647>