View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000166 | 1003.1(2008)/Issue 7 | System Interfaces | public | 2009-10-09 15:26 | 2013-04-16 13:06 |
| Reporter | geoffclare | Assigned To | ajosey | ||
| Priority | normal | Severity | Comment | Type | Error |
| Status | Closed | Resolution | Accepted | ||
| Name | Geoff Clare | ||||
| Organization | The Open Group | ||||
| User Reference | |||||
| Section | wait | ||||
| Page Number | 2185 | ||||
| Line Number | 68859,68887 | ||||
| Interp Status | --- | ||||
| Final Accepted Text | |||||
| Summary | 0000166: errno indeterminate in wait() example | ||||
| Description | The second example on the wait() page has a signal handler that does not save and restore errno. Thus the value of errno where it is used (via perror()) in main() is indeterminate if the signal handler has been called. Admittedly the problem could only occur if a fork() error is encountered after the 2 seconds that the first child sleeps (i.e. the system would have to be very slow, or heavily loaded), but I think the change is still worth making in order to demonstrate the proper way to write signal handlers which make calls that can change errno. | ||||
| Desired Action | At line 68859 insert: int sav_errno = errno; before: int status; After line 68887 add: errno = sav_errno; (indented the same amount as the '}' on line 68887). | ||||
| Tags | tc1-2008 | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-10-09 15:26 | geoffclare | New Issue | |
| 2009-10-09 15:26 | geoffclare | Status | New => Under Review |
| 2009-10-09 15:26 | geoffclare | Assigned To | => ajosey |
| 2009-10-09 15:26 | geoffclare | Name | => Geoff Clare |
| 2009-10-09 15:26 | geoffclare | Organization | => The Open Group |
| 2009-10-09 15:26 | geoffclare | Section | => wait |
| 2009-10-09 15:26 | geoffclare | Page Number | => 2185 |
| 2009-10-09 15:26 | geoffclare | Line Number | => 68859,68887 |
| 2009-10-09 15:26 | geoffclare | Interp Status | => --- |
| 2009-10-15 15:43 |
|
Status | Under Review => Resolved |
| 2009-10-15 15:43 |
|
Resolution | Open => Accepted |
| 2010-08-27 13:05 | ajosey | Tag Attached: tc1-2008 | |
| 2013-04-16 13:06 | ajosey | Status | Resolved => Closed |