getitimer.2: Note Linux's odd handling of the new_value==NULL case

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-10-01 10:20:08 +02:00
parent f2d587e6a1
commit 20de4d9f77
1 changed files with 16 additions and 1 deletions

View File

@ -4,7 +4,7 @@
.\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" 2005-04-06 mtk, Matthias Lang <matthias@corelatus.se>
.\" Noted MAX_SEC_IN_JIFFIES ceiling
.TH GETITIMER 2 2012-09-30 "Linux" "Linux Programmer's Manual"
.TH GETITIMER 2 2012-10-01 "Linux" "Linux Programmer's Manual"
.SH NAME
getitimer, setitimer \- get or set value of an interval timer
.SH SYNOPSIS
@ -166,6 +166,21 @@ and the three interfaces
and
.BR usleep (3)
unspecified.
The standards are silent on the meaning of the call:
setitimer(which, NULL, &old_value);
Many systems (Solaris, the BSDs, and perhaps others)
treat this as equivalent to:
getitimer(which, &old_value);
In Linux, this is treated as being equivalent to a call in which the
.I new_value
fields are zero; that is, the timer is disabled.
.IR "Don't use this Linux misfeature" :
it is nonportable and unnecessary.
.SH BUGS
The generation and delivery of a signal are distinct, and
only one instance of each of the signals listed above may be pending