home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v3 / text0005.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  2.2 KB

  1. Date: 06 Oct 85 19:19:53 +1000 (Sun)
  2. >From: Robert Elz <munnari!kre@seismo.CSS.GOV>
  3.  
  4. Section 2.3 of draft 4 [ Section 2.4 of Draft 5 -jsq ]
  5. of working group P1003 of (etc, etc of) IEEE states
  6.  
  7.     Errno is not changed on successful calls, ...
  8.  
  9. This is a stronger statement than I would like to see.  Again,
  10. my reason is that this introduces a distinction between the
  11. magic "system call" and the ordinary "library routine".
  12.  
  13. [ No, it removes a distinction between them.  It is really a
  14. misfeature that some library routines set errno when they
  15. have not failed. -Gwyn ]
  16.  
  17. Much better would simply be to state (as I believe the ANSI
  18. C working group's draft states - though I can't find my copy
  19. right now) that "errno is defined only after unsuccessful
  20. calls to routines where it is explicitly stated to be set".
  21.  
  22. That is, it is only meaningful to test errno after a function
  23. call that has returned an error indication, where that function
  24. has been documented to set errno to indicate the cause of the
  25. error.  That includes all system calls, and some library routines.
  26.  
  27. [ This is essentially what Draft 5 says about testing errno,
  28. although its wording is slightly confusing.  -Gwyn ]
  29.  
  30. [ Which is exactly the problem:  even if you already know what it was
  31. supposed to mean, you have to read it a few times to see if it really
  32. does.  This problem was mentioned by several people at the Steering
  33. Group meeting in Dallas.  However, that group was not authorized by the
  34. committee to make substantive changes to the actual draft.  But we did
  35. add a note in an Appendix explaining the problem, what the X3J11 draft
  36. currently says, and a proposed better wording.  This will appear in
  37. Draft 6, so that it can be taken into account during the Trial Use
  38. balloting.  I do not unfortunately have the text of that note, as I
  39. don't have Draft 6 yet.
  40.  
  41. Don Kretsch plans to propose the same wording as that of the D6
  42. appendix to X3J11 as a replacement for their current wording.
  43. -jsq ]
  44.  
  45. With the caveat on the use of "errno" in section 3.3.2.5 I
  46. wonder if perhaps its days are not numbered.  I would have
  47. to think what might replace it though.
  48.  
  49. Robert Elz        seismo!munnari!kre    kre%munnari.oz@seismo.css.gov
  50.  
  51. Volume-Number: Volume 3, Number 6
  52.  
  53.