On Sat, Dec 02, 2017 at 11:54:23AM -0700, Theo de Raadt wrote: > > > Wouldn't be the first error in POSIX. The documents have gotten > > > sloppier. I think this is due to their commitee not acquiring any > > > sensible young blood. > > > > fwiw, the "return zero and only zero" behavior traces back at least > > as far as here (SUSv2, I think): > > > > http://pubs.opengroup.org/onlinepubs/7908799/xsh/gettimeofday.html > > > > so if it's an error it isn't a "new" error. > > Hang on, you say behavior. > > Behavior is a quality of implementation. If you research back to the > dawn of time, gettimeofday would return -1 and EFAULT because it uses > a kernel function copyout(9) to do it's work, or maybe even earlier > a pair of suword calls with the same error return. > > Implementation leads to that behavior. > > Did someone do it differently? Maybe, but developers need to know > that passing an invalid pointer can result in an error return rather > than some weird fault. > > The POSIX document is a descriptive document. It should describe the > existing behavior to enhance compatibility. There are strategies for > how one may describe a behavior: minimally or maximally, with impacts > on readership in all directions. This instance shows they prefer to > be minimally descriptive or dare I say it -- inaccurate by omission. > They may have some goal in mind, but it still is inaccurate, and their > justifications are kept largely secret. It is a secretive cabal, and > don't point me to austin-group lists, it is nothing more than lipstick > on a pig. > > When descriptive documents willfully describe a system incompletely, > it makes it harder for software developers to consider them as a > proscriptive or leading agency. Errors result.
How apropos that I write "behavior" when I meant "wording." Point well taken. -- Scott Cheloha
