Is it considered to be ok to not check the return code of close(2) in base?

Warner Losh imp at bsdimp.com
Mon Jan 1 20:46:13 UTC 2018


On Mon, Jan 1, 2018 at 11:35 AM, Rodney W. Grimes <
freebsd-rwg at pdx.rh.cn85.dnsmgr.net> wrote:

> > --------
> > In message <201801011755.w01HtOtD087353 at pdx.rh.CN85.dnsmgr.net>,
> "Rodney W. Gri
> > mes" writes:
> >
> > >It further says that an assert() appeared in V6, and I bet that NDEBUG
> > >didnt exist at that time.
> >
> > Well, I think you'll loose that bet, because the earliest copy of
> assert.h
> > which has been uncovered does have NDEBUG:
> >
> >       https://github.com/dspinellis/unix-history-repo/blob/
> Research-V7-Snapshot-Development/usr/include/assert.h
>
> Um V7 was after V6, and is probably when asssert.h was introduced, so I
> would win the bit, assert.h didnt even exist at V6.
> I can go pull the hardcopy manuals and check.... be later today.
>

I can state with 100% certainty that neither assert nor ASSERT were defined
in the existing v6 distributions available from TUHS.

In pwb, such a macro exists in the malloc.c source (ASSERT), but isn't
available to anything but the source/s4/malloc.c, which doesn't count as
being available. I stand by my analysis that says v7 was the first time it
was available. And even so, if debug wasn't defined, ASSERT was defined to
be nothing.

Warner


More information about the freebsd-hackers mailing list