Interpretations

Answering questions that may arise related to the meaning of portions of an IEEE standard concerning specific applications.

IEEE Standards Interpretation for IEEE Std 1003.1™-1990 IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX®)

Copyright © 2001 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.

Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.

IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA

Interpretation Request #89
Topic: timer_settime Relevant Sections: Page 315, clause 14.2.4 PASC

The timer_settime() specificiation states: "If any of the following errors occur...." [EINVAL]A value structure specified a nanosecond value less than zero or greater than or equal to 1000 million." The spec also states: "If the it_value member of value is zero, the timer is disarmed. The effect of disarming or resetting a timer on pending expiration notifications is unspecified. " If I call timer_settime() with value->it_interval less than zero and greater than or equal to 100 million, and the it_value set to zero - is it conforming for an implementation of timer_settime() to succeed without an EINVAL error?

The intent should be: disarm the timer and ignore the bogus interval value. However, the standard is clear in this respect. Section 2.4, only allows errors to be omitted if they are of the "if detected" variety. The EINVAL return in 14.2.4.4, line 297 SHALL be returned. The description in 14.2.4.2, lines 225-226, states "If the it_value member of value is zero, the timer SHALL be disarmed". A proposed disposition is as follows: The standard states that the function needs to disarm the timer, AND return -1 and set errno to EINVAL, however concerns are being forwarded to the sponsor. Proposed note to project editor (not part of the interpretation): It is recommended that a future revision consider making the the EINVAL return an "if detected" or otherwise reword it so that the function can succeed even with a garbage value of it_interval, so long as it_value is zero.

Interpretation Response
The standard states that the function needs to disarm the timer, AND return -1 and set errno to EINVAL, however concerns are being forwarded to the sponsor.

Rationale for Interpretation
None.

Note to Project Editor (not part of the interpretation)
It is recommended that a future revision consider making the the EINVAL return an "if detected" or otherwise reword it so that the function can succeed even with a garbage value of it_interval, so long as it_value is zero. Forwarded to Interpretations group: 3 May 1998 Proposed interpretation: 17 Jul 1998 Finalized: February 17 1999