Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2015 17:36:37 -0400 (EDT)
From:      Garrett Wollman <wollman@hergotha.csail.mit.edu>
To:        avg@freebsd.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT
Message-ID:  <201507082136.t68LaadU097999@hergotha.csail.mit.edu>
References:  <CAPQ4ffuTcN_ytcH7GPY0s6OqWK9qo6MGaVZhOB%2B0ojWfd=fNCg@mail.gmail.com> <201507072241.t67MfsX5085860@hergotha.csail.mit.edu> <94BCDA65-5B86-4329-A312-4CB16E847B69@dons.net.au> <CAPQ4ffuuaiWGUthEhux2VrK6ZyHDT=0xd9z8k8f11N=6shdUng@mail.gmail.com> <201507081616.t68GGcY9047713@dyslexicfish.net> <CACA0VUhFjBhPMTr=QD71jEvis9CMSrnpyu=xFiXu27nLeozGJA@mail.gmail.com> <0C541CE5-C322-4273-AE0B-1ACAEACCA096@gmail.com> <559D8E55.9050600@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <559D8E55.9050600@FreeBSD.org> avg@freebsd.org writes:
>I am not suggesting this but if our man pages used all capitals to signify
>important auxiliary verbs then the ERRORS sections would read as
>	The following error codes MAY be set in errno:
>Perhaps in that case it would be more clear how 'MAY' differs from 'SHOULD' and
>'MUST'.
>Of course, the manual pages seem to be too sloppy in this respect.

No, it's just the standard meaning of "may" as defined in the POSIX
standard.  ISO standards in general use "shall" for mandatory behavior
and "may" for optional behavior.  (For every occurrence of the word
"shall" in the POSIX standard, there should be a conformance test[1];
"may" covers behavior where implementations are allowed to differ with
no conformance distinction being made.)  In the specific case of
library interfaces, "may fail and set the following code in errno" is
slightly more restrictive: the implementation is required to raise
that error if the associated condition is detected, but it is not
required to detect that condition even if it is present, and it may
indicate some other error condition that is present and detectable.

-GAWollman

[1] Technically, this applies only to "shall" where the subject is the
implementation.  POSIX also includes "shall" requirements on
applications, which obviously can't be tested.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507082136.t68LaadU097999>