A mirror of Man pages
Go to file
Bruno Haible 8d4d268f0e ptsname.3: Fix description of failure behaviour of ptsname_r()
The Linux man page for ptsname_r, when describing the behaviour
in the error case, is
  - not consistent with the future POSIX standard (POSIX Issue 8).
  - not consistent with musl libc.

Find attached a patch to
  - keep it consistent with what glibc does,
  - make it consistent with musl libc,
  - make it consistent with the future POSIX standard (POSIX
    Issue 8).

Details:

glibc's implementation of ptsname_r, when it fails, returns the
error code as return value AND sets errno. See
https://sourceware.org/git/?p=glibc.git;a=blob;f=login/ptsname.c
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mach/hurd/ptsname.c
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/ptsname.c

musl's implementation of ptsname_r, when it fails, returns the error code
but does NOT set errno. See
https://git.musl-libc.org/cgit/musl/tree/src/misc/pty.c

The proposal to add ptsname_r to POSIX, with text

  "If successful, the ptsname_r( ) function shall return zero.
   Otherwise, an error number shall be returned to indicate the
   error."

has been accepted for inclusion in POSIX Issue 8.
http://austingroupbugs.net/view.php?id=508

Therefore a portable program should look at the return value from
ptsname_r, NOT the errno value. The current text in the man page
suggests to look at the errno value, which is wrong (because of
musl libc) and not future-proof (because of future POSIX).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-25 21:44:06 +02:00
man1 localedef.1: wfix 2020-04-20 10:58:34 +02:00
man2 io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2: Change uses of aio_context_t to io_context_t 2020-04-25 09:02:18 +02:00
man3 ptsname.3: Fix description of failure behaviour of ptsname_r() 2020-04-25 21:44:06 +02:00
man4 lp.4: tfix + ffix 2020-04-22 22:12:40 +02:00
man5 proc.5: Alert the reader that UID/GID changes can reset the "dumpable" attribute 2020-04-21 14:27:34 +02:00
man6 intro.6: wfix 2017-08-25 21:41:03 +02:00
man7 rtnetlink.7: Minor consistency fixes 2020-04-24 22:11:13 +02:00
man8 ld.so.8: ffix 2020-04-14 11:59:14 +02:00
scripts scripts: mark them executable 2018-05-31 21:34:32 +02:00
CONTRIBUTING CONTRIBUTING: New file with some starting tips on how to contribute 2019-09-13 15:59:08 +02:00
Changes Start of man-pages-5.07: updating Changes and Changes.old 2020-04-12 08:32:06 +02:00
Changes.old Changes.old: Fixes to 5.06 change log 2020-04-12 09:34:30 +02:00
Makefile Makefile: Remove a redundant comment 2017-11-20 10:38:10 +01:00
README README: Remove "Man page overlap and duplication" section 2020-04-13 09:06:45 +02:00
man-pages-5.07.Announce Start of man-pages-5.07: updating .Announce and .lsm files 2020-04-12 08:32:06 +02:00
man-pages-5.07.lsm Start of man-pages-5.07: updating .Announce and .lsm files 2020-04-12 08:32:06 +02:00

README

This package contains Linux man pages for sections 1 through 8.  Some
more information is given in the 'man-pages-x.y.Announce' file.

Homepage
========
For information about the Linux man-pages project, see
http://www.kernel.org/doc/man-pages/index.html.

Bug reports and contributing
============================
If you have corrections and additions to suggest, see
http://www.kernel.org/doc/man-pages/contributing.html
(Although there is a mirror of this repository on GitHub,
please don't report issues via the GitHub issue tracker!)

For further information on contributing, see the CONTRIBUTING file.

Installing and uninstalling
===========================
"make install" will copy these man pages to /usr/share/man/man[1-8].

To install to a path different from /usr, use
"make install prefix=/install/path".

"make remove" or "make uninstall" will remove any man page in this
distribution from its destination.  Use with caution, and remember to
use "prefix" if desired, as with the "install" target.

"make" or "make all" will perform "make uninstall" followed by "make
install".

Copyrights
==========
See the 'man-pages-x.y.Announce' file.