Email List: Xaustin-group-lX
[All Lists]

Re: Bug in XSH (async-cancel-safe contradictory text)

To: Geoff Clare <gwc@xxxxxxxxxxxxx>
Subject: Re: Bug in XSH (async-cancel-safe contradictory text)
From: Michael Kerrisk <mtk.lists@xxxxxxxxx>
Date: Tue, 11 Nov 2008 12:57:31 -0500
Cc: austin-group-l@xxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=PH67m4Okv/HQfeH88MvOcDV6wGv2z1q2Blf2f3o+r1k=; b=Z4MpqDX2hREJ0uzqn44N4I2gVR/wPph+vKA6lN5//7wzmyrDNKn/5xP+dT55ztfj4a obaWIh1/BU3Ok0IFDnOzkeMNSPbm3QFT3CPNf9Q4WNRE+0MlkpkflPY30y1/6urOnrdc Brxot+HYGrSRv3uh80t3+yJsr9UrwscZFQH80=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=p2JamWSWKBEgyHnvo+6+dIKeM+klcAx/x1rQz5e06dWWIrwj6MsBgqXhUTi6KaUDxW kzxZa+8BAsO2SRng2iHGygiIhp6mYk4YpORAQPopH9Nn1CwEbUkqJluZFzwTHMDq+Zjy Td6Rysayc+Mp7EZ0aRVfjWWyzRtXzJeSYNkQs=
References: <4919AF78.2080307@gmail.com> <20081111172939.GB14344@squonk.masqnet>
Hi Geoff,

Thanks for your quick response.

Geoff Clare wrote:
Michael Kerrisk <mtk.lists@gmail.com> wrote, on 11 Nov 2008:
@ page 515 line 17842 to 17845 section XSH comment

Problem:

Lines 17842 to 17845 of draft 5.1 read as follows:

==
2.9.5.4 Async-Cancel Safety
The pthread_cancel(), pthread_setcancelstate(), and pthread_setcanceltype() functions are defined to be async-cancel safe. No other functions in this volume of POSIX.1-200x are required to be async-cancel-safe.
==

But the last sentence above seems to be directly contradicted by lines 62196 to 62197 of the sigwait() spec, which say:

==
After some consideration, threads were allowed to use semaphores
and sem_post() was defined to be async-signal and async-cancel-safe.
==
This problem seems to go right back to the original .1c threads
standard.  At least, the same rationale appears in POSIX.1-1996
in section B.11.4.3 (Page 527 Line 6994).

Probably we should just remove "and async-cancel-safe".
That makes sense. Probably better to remove " and async-cancel", so that one ends up with: "...was defined to be async-signal-safe."

And again there seems to be contradictory text in XRAT lines 118498 to 118499:

==
IEEE Std 1003.1-2001/Cor 1-2002, item XSH/TC1/D6/6 is applied, adding the abort() function to the list of async-cancel-safe functions
==
This one is an obvious mistake in the wording of 1003.1-2001/Cor 1-2002, item XSH/TC1/D6/6. It added abort() to
the table of async-signal-safe functions in 2.4.3, but somehow
the word "cancel" got into the description of the change instead
of "signal".
I wondered if it was some such.

Thanks,

Michael

<Prev in Thread] Current Thread [Next in Thread>