IEEE Standards Interpretations for IEEE Std 1003.1b™-1993 IEEE Standard for Information Technology - Portable Operating System Interfaces (POSIX(R)) - Part 1: System Application Program Interface (API) - Amendment 1: Realtime Extension [C language]
Copyright © 1996 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 #7
Topic: sigaction Relevant Sections: 22.214.171.124. Page 72 lines 915-923
IEEE Std 1003.1b-1993 Section 126.96.36.199. Page 72 lines 915-923 describes what happens if a signal is pending that is dispatched at a time when a signal handler was in place expecting three arguments. This section does not describe what happens to the second and third arguments of a signal handler that catches a signal that was dispatched when a signal handler expecting one argument was installed. What is the conformant behaviour in this case?
The question as asked has some ambiguity and would have different answers based up which question is meant. If a signal is generated during a time that SA_SIGINFO is set in sa_flags, sigqueue can pass a si_value and the signal has an associated si_code. If sigaction is called with sa_flags clear, then the standard is clear that 'the signal-catching function shall be invoked with only a single argument' (pg 72 line 917): the signo is delivered. If a signal is generated during a time that SA_SIGINFO is cleared in sa_flags, sigqueue still has a si_value and the associated si_code. If sigaction is then called before delivery with sa_flags set, then the standard is clear that 'The application specified value shall be passed to the signal- catching function...' (pg 72 line 922-923).
Rationale for Interpretation