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

Defect in XSH waitid()

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XSH waitid()
From: yyyyyyy@xxxxxxxxxx
Date: Sat, 17 Jul 2004 08:36:32 +0100 (BST)
        Defect report from : Ulrich Drepper , Red Hat, Inc.

(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)

@ page 1615 line 50190 section waitid() objection {ud-waitid}

Problem:

Edition of Specification (Year): 2004

Defect code :  1. Error

The waitid() currently says about the flags used for the options parameter of 
waitid():

The options argument is used to specify which state changes waitid() shall wait 
for. It is formed by OR ing together one or more of the following flags:

 WEXITED Wait for processes that have exited.
 WSTOPPED Status shall be returned for any child that has stopped upon receipt 
of a signal.
 WCONTINUED Status shall be returned for any child that was stopped and has 
been continued.
 WNOHANG Return immediately if there are no children to wait for.
 WNOWAIT Keep the process whose status is returned in infop in a waitable 
state. This shall not affect the state of the process; the process may be 
waited for again after this call completes.


The problem is the introducing sentence.  The current wording would allow calls 
like

   waitid(..., ..., ..., WNOHANG)
and
   waitid(..., ..., ..., WNOWAIT)

Both calls make no sense since it is not specified what has to be waited on.  
Instead it should be required that at least on of the first three flags must be 
set since those three specify what the function is supposed to do.

Action:

Replace line 50190f with

The options argument is used to specify which state changes waitid() shall wait 
for. It is formed by OR ing together the following flags:


Add after line 50199 (or alternatively after line 50195):

At least one of the flags WEXITED, WSTOPPED, or WCONTINUED must be set in 
/options/.

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