[RFC v1] man/man2/close.2: CAVEATS: Document divergence from POSIX.1-2024
Alejandro Colomar
alx@kernel.org
Fri Jan 23 14:44:01 GMT 2026
Hi Al,
On Fri, Jan 23, 2026 at 01:38:59AM +0000, Al Viro wrote:
> On Fri, Jan 23, 2026 at 02:02:53AM +0100, Alejandro Colomar wrote:
> > > HISTORY
> > > The close() system call was present in Unix V7.
> >
> > That would be simply stated as:
> >
> > V7.
> >
> > We could also document the first POSIX standard, as not all Unix APIs
> > were standardized at the same time. Thus:
> >
> > V7, POSIX.1-1988.
> >
> > Thanks!
>
> 11/3/71 SYS CLOSE (II)
> NAME close -- close a file
> SYNOPSIS (file descriptor in r0)
> sys close / close = 6.
> DESCRIPTION Given a file descriptor such as returned from an open or
> creat call, close closes the associated file. A close of
> all files is automatic on exit, but since processes are
> limited to 10 simultaneously open files, close is
> necessary to programs which deal with many files.
> FILES
> SEE ALSO creat, open
> DIAGNOSTICS The error bit (c—bit) is set for an unknown file
> descriptor.
> BUGS
> OWNER ken, dmr
>
> That's V1 manual. In V3 we already get EBADF on unopened descriptor;
> in _all_ cases there close(N) ends up with descriptor N not opened.
Thanks! Then it should actually be
V1, POSIX.1-1988.
Let's not document the history change from V3, as those details are
better documented as part of the V3 manual and reading the sources.
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260123/a63afa75/attachment.sig>
More information about the Libc-alpha
mailing list