View Issue Details

IDProjectCategoryView StatusLast Update
00002751003.1(2004)/Issue 6System Interfacespublic2013-04-16 13:06
ReporterDon Cragun Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Referencegwc raise async safety
Sectionsignal
Page Number1387
Line Number43255-43256
Interp StatusApproved
Final Accepted TextSee 0000275:0000453
Summary0000275: conflict concerning raise() between XSH 2.4.3 and signal() DESCRIPTION
Description The list of async-signal-safe functions in 2.4.3 "Signal Actions"
 includes raise(), and the standard says for functions in that list,
 "applications may invoke them, without restriction, from
 signal-catching functions".

 However, the signal() page says:
     "If the signal occurs as the result of calling the abort(),
     raise(), [CX] kill(), pthread_kill(), or sigqueue() [/CX] function,
     the signal handler shall not call the raise() function."

 which places a restriction on the use of raise() from signal-catching
 functions installed using signal(), and thus is in conflict with the
 above quote from 2.4.3.

 The restriction derives from the C Standard and presumably is there
 because of some limitation in certain types of implementation of the
 C Standard. It seems doubtful that any POSIX systems have this
 limitation, and the restriction should be removed in POSIX. If it
 were really needed, then there would have been an equivalent
 restriction for signal-catching functions installed using sigaction(),
 and an equivalent restriction on calling kill(getpid(), sig).

 The action below just removes the restriction. A more radical
 alternative would be to rewrite the signal() page so that it just
 says (CX shaded)
     "The signal() function shall behave as if it is implemented as
     follows:"

 with code showing signal() implemented in terms of sigaction() (with a
 choice of 2 sets of values for sa_flags). Anything on the signal()
 page that is generally about signals rather than specific to the
 signal() function, and is not already covered in 2.4 Signal Concepts,
 should be moved there (except for the restriction on calling raise()).

 This defect report should be sent down the interpretations track for
 consideration in TC1.
Desired Action Change:
     "If the signal occurs as the result of calling the abort(),
     raise(), [CX] kill(), pthread_kill(), or sigqueue() [/CX] function,
     the signal handler shall not call the raise() function."

 on P1387, L43255-43256 in XSH6 (P1937, L61633-61634 in XSH7) to:
     "The C Standard places a restriction on applications relating to the
     use of raise() from signal handlers. [CX] This restriction does not
     apply to POSIX applications, as POSIX.1-200x requires raise() to
     be async-signal-safe (see [xref to 2.4.3 Signal Actions]).[/CX]"

replacing "POSIX.1-200x" with the macro denoting the current revision
of the standard.
Tagstc1-2008

Activities

Don Cragun

2010-07-01 04:07

manager   bugnote:0000452

Copied from xshbug2.txt ERN 241.
Originally submitted by Geoff Clare.
Processed too late to be included in IEEE Std 1003.1-2008.

Don Cragun

2010-07-01 04:11

manager   bugnote:0000453

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
See Desciprtion.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Make the changes suggested in the Desired Action.

ajosey

2010-07-30 08:20

manager   bugnote:0000499

Comments/objections on the proposed interpretation are due by COB Aug 31 2010

Issue History

Date Modified Username Field Change
2010-07-01 04:05 Don Cragun New Issue
2010-07-01 04:05 Don Cragun Status New => Under Review
2010-07-01 04:05 Don Cragun Assigned To => ajosey
2010-07-01 04:05 Don Cragun Name => Geoff Clare
2010-07-01 04:05 Don Cragun Organization => The Open Group
2010-07-01 04:05 Don Cragun User Reference => gwc raise async safety
2010-07-01 04:05 Don Cragun Section => signal
2010-07-01 04:05 Don Cragun Page Number => 1387
2010-07-01 04:05 Don Cragun Line Number => 43255-43256
2010-07-01 04:05 Don Cragun Interp Status => ---
2010-07-01 04:07 Don Cragun Note Added: 0000452
2010-07-01 04:11 Don Cragun Interp Status --- => Pending
2010-07-01 04:11 Don Cragun Final Accepted Text => See 0000275:0000452
2010-07-01 04:11 Don Cragun Note Added: 0000453
2010-07-01 04:11 Don Cragun Status Under Review => Interpretation Required
2010-07-01 04:11 Don Cragun Resolution Open => Accepted
2010-07-01 04:15 Don Cragun Final Accepted Text See 0000275:0000452 => See 0000275:0000453
2010-07-30 08:20 ajosey Interp Status Pending => Proposed
2010-07-30 08:20 ajosey Note Added: 0000499
2010-09-03 16:41 ajosey Interp Status Proposed => Approved
2010-09-03 21:00 Don Cragun Tag Attached: tc1-2008
2010-09-09 16:09 TestReporterAccount Tag Attached: issue8
2010-09-09 16:11 TestReporterAccount Tag Detached: issue8
2013-04-16 13:06 ajosey Status Interpretation Required => Closed