View Issue Details

IDProjectCategoryView StatusLast Update
00008041003.1(2013)/Issue7+TC1Base Definitions and Headerspublic2014-02-06 17:00
Reporterjilles Assigned To 
PrioritynormalSeverityObjectionTypeClarification Requested
Status ClosedResolutionRejected 
NameJilles Tjoelker
OrganizationFreeBSD
User Referencefreebsd-kern/181439
Section<sys/wait.h>
Page Number408
Line Number13694-13695
Interp Status---
Final Accepted Text
Summary0000804: waitid() practically requires #include <signal.h> anyway
DescriptionThe description of <sys/wait.h> says that the <sys/wait.h> header shall define the siginfo_t type as described in <signal.h> and that it may make visible all symbols from <signal.h>. Therefore, a conforming application that compares si_status to a constant like CLD_EXITED shall #include <signal.h> anyway. However, glibc makes visible all symbols from <signal.h> in <sys/wait.h> and the application works without #include <signal.h>.
Desired ActionChange lines 13694 and 13695:

The <sys/wait.h> header shall define the siginfo_t type as described in <signal.h>.

Inclusion of the <sys/wait.h> header may also make visible all symbols from <signal.h>.

to one line:

Inclusion of the <sys/wait.h> header shall make visible all symbols from <signal.h>.


Alternatively, only the CLD_* constants could be made mandatory. However, "may make visible all symbols from" helps implementations, but hurts application portability.
TagsNo tags attached.

Activities

shware_systems

2013-12-17 09:38

reporter   bugnote:0002078

Last edited: 2013-12-18 15:25

The current wording is boilerplate to support that headers can use various techniques to speed up compile times when only a few items from another header are required to access and use an interface declared in the referencing header. If a portable application doesn't compile properly, that's a defect of the header, not the standard. Most implementations don't bother trying to do this as it does makes maintenance more difficult, and just #include the referenced header so they are sure they get what's needed, at the expense of processing stuff they don't need. The wording also allows this practice. While for this particular example the speed slowdown might not be all that much for various implementations by requiring the second way, I can't see making this an exception to the general practice. For others where <signal.h> also includes declarations for a number of implementation extensions it might be significant.

msbrown

2014-02-06 16:58

manager   bugnote:0002125

Last edited: 2014-02-06 16:59

Implementations are allowed, but not required, to expose all of the symbols of signal.h. Applications requiring additional symbols are required to add the appropriate header. Adding exposure of these symbols as a new requirement can break existing implementations. The "may make visible" convention is widely used in several headers and we can see no reason to single out this header for special treatment.

Issue History

Date Modified Username Field Change
2013-11-24 14:13 jilles New Issue
2013-11-24 14:13 jilles Name => Jilles Tjoelker
2013-11-24 14:13 jilles Organization => FreeBSD
2013-11-24 14:13 jilles User Reference => freebsd-kern/181439
2013-11-24 14:13 jilles Section => <sys/wait.h>
2013-11-24 14:13 jilles Page Number => 408
2013-11-24 14:13 jilles Line Number => 13694-13695
2013-12-17 09:38 shware_systems Note Added: 0002078
2013-12-18 15:25 shware_systems Note Edited: 0002078
2014-02-06 16:58 msbrown Note Added: 0002125
2014-02-06 16:59 msbrown Note Edited: 0002125
2014-02-06 17:00 msbrown Interp Status => ---
2014-02-06 17:00 msbrown Status New => Closed
2014-02-06 17:00 msbrown Resolution Open => Rejected