delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/12/06:58:49

Date: Mon, 12 Jul 1999 13:54:48 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
cc: DJ Delorie <dj AT delorie DOT com>
Subject: setitimer and getitimer
Message-ID: <Pine.SUN.3.91.990712134715.4966B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

It seems that our implementation gets wrong the value returned by 
getitimer and setitimer (the latter in the ovalue argument).  We
return the *remaining* time until the timer expires, whereas the
Unix semantics seems to be to return the *original* timer value
passed to setitimer last time it was called.

Does Posix have any clear specification about this?

I found this when some Unix program that relied on this didn't work as 
expected when compiled with DJGPP.  I checked on a Sparc/Solaris
machine nearby, and it indeed returns the original timer values.

Can people please check this on Linux and maybe other platforms as well?  
Changing our behavior is easy, but I'd like to know that I'm doing the 
right thing...

Thanks in advance.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019