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

Defect in XSH pselect()

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XSH pselect()
From: yyyyyyy@xxxxxxxxxx
Date: Thu, 19 Jan 2006 07:40:32 GMT
Resent-date: Thu, 19 Jan 2006 07:56:59 +0000
Resent-from: Andrew Josey <yyyyyy@xxxxxxxxxxxxxxxxx>
Resent-message-id: <1060119075659.ZM16655@xxxxxx>
Resent-to: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
        Defect report from : Ulrich Drepper , Red Hat, Inc.

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 989 line 31622 section pselect() objection {ud-pselect}

Problem:

Edition of Specification (Year): 2004

Defect code :  2. Omission

pselect() is a cancellation point.  It also can modify the signal mask 
temporarily.  The question is: what is the state of the thread's signal mask if 
it gets canceled while in a pselect call?  What mask will the registered 
cleanup handlers find?

Some/many implementations use signals to implement cancellations.  In this case 
the signal mask installed by pselect would be in affect unless changed 
explicitly.

Action:

I would prefer to leave this case undefined.  I.e., add a new paragraph after 
line 31621 (shared with THR):

If a thread gets canceled during a pselect() call the signal mask in effect 
when executing the registered cleanup functions is either the original signal 
mask or the signal mask installed as part of the pselect() call.


Alternatively it can be required that the original signal mask is always 
restored.  In this case the new paragraph could read:

If a thread gets canceled during a pselect() call the original signal mask must 
be restored before the cleanup handlers are executed.

<Prev in Thread] Current Thread [Next in Thread>
  • Defect in XSH pselect(), drepper <=