| Anonymous | Login | Signup for a new account | 2010-09-09 05:20 UTC |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Category | Severity | Type | Date Submitted | Last Update | |||||||
| 0000153 | [1003.1(2008)/Issue 7] System Interfaces | Objection | Omission | 2009-09-22 09:29 | 2009-12-07 16:56 | |||||||
| Reporter | geoffclare | View Status | public | |||||||||
| Assigned To | ajosey | |||||||||||
| Priority | normal | Resolution | Accepted | |||||||||
| Status | Interpretation Required | |||||||||||
| Name | Geoff Clare | |||||||||||
| Organization | The Open Group | |||||||||||
| User Reference | ||||||||||||
| Section | waitid | |||||||||||
| Page Number | 2190 | |||||||||||
| Line Number | 69084 | |||||||||||
| Interp Status | Approved | |||||||||||
| Final Accepted Text | Note: 0000291 | |||||||||||
| Summary | 0000153: waitid() return of 0 is ambiguous | |||||||||||
| Description |
The description of waitid() states: "If waitid() returns because a child process was found that satisfied the conditions indicated by the arguments idtype and options, then the structure pointed to by infop shall be filled in by the system with the status of the process. The si_signo member shall always be equal to SIGCHLD." However, it does not state what happens to the structure pointed to by infop when waitid() returns because WNOHANG was specified and status is not available for any process specified by idtype and id. Since the return value is zero in both cases, applications need to examine at least one field of the structure in order to distinguish between the cases. Readers might assume that since the standard only says the structure is filled in for one case, it is left unchanged for the other. However, existing practice seems to be to zero out the structure (or, at least the fields I examined - si_signo, si_pid, si_code and si_status). Since zero is a special value for signal numbers and process IDs, I propose that the standard should require the si_signo and si_pid fields to be set to zero. The word "always" in the last sentence of the above quote is also a problem: from the context, the intention appears to be that this statement only applies when waitid() fills in the structure with the status of a child process, but it could be taken to mean si_signo is set to SIGCHLD for the no-status-available case as well. |
|||||||||||
| Desired Action |
Change "... with the status of the process. The si_signo member shall always be equal to SIGCHLD." to "... with the status of the process; the si_signo member shall be set equal to SIGCHLD. If waitid() returns because WNOHANG was specified and status is not available for any process specified by idtype and id, then the si_signo and si_pid members of the structure pointed to by infop shall be set to zero and the values of other members of the structure are unspecified." |
|||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
|
|
||||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-09-22 09:29 | geoffclare | New Issue | |
| 2009-09-22 09:29 | geoffclare | Status | New => Under Review |
| 2009-09-22 09:29 | geoffclare | Assigned To | => ajosey |
| 2009-09-22 09:29 | geoffclare | Name | => Geoff Clare |
| 2009-09-22 09:29 | geoffclare | Organization | => The Open Group |
| 2009-09-22 09:29 | geoffclare | Section | => waitid |
| 2009-09-22 09:29 | geoffclare | Page Number | => 2190 |
| 2009-09-22 09:29 | geoffclare | Line Number | => 69084 |
| 2009-09-22 09:29 | geoffclare | Interp Status | => --- |
| 2009-09-24 15:52 | msbrown | Interp Status | --- => Pending |
| 2009-09-24 15:52 | msbrown | Note Added: 0000239 | |
| 2009-09-24 15:52 | msbrown | Status | Under Review => Interpretation Required |
| 2009-09-24 15:53 | msbrown | Resolution | Open => Accepted |
| 2009-11-07 07:30 | ajosey | Note Added: 0000291 | |
| 2009-11-07 07:30 | ajosey | Interp Status | Pending => Proposed |
| 2009-11-07 07:30 | ajosey | Final Accepted Text | => Note: 0000291 |
| 2009-12-07 16:56 | ajosey | Interp Status | Proposed => Approved |
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |