Commit Graph

16809 Commits

Author SHA1 Message Date
Michael Kerrisk bcdd78a0e0 mq_close.3: DESCRIPTION: add reference to mq_notify(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-08 14:06:34 +01:00
Michael Kerrisk 91d5e32f68 tmpnam.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-08 14:06:02 +01:00
Michael Kerrisk 049c89bdc0 close.2: Place discussion of error handling under a subheading in NOTES
No content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-08 10:15:00 +01:00
Michael Kerrisk a62ca28af6 feature_test_macros.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-08 10:15:00 +01:00
Michael Kerrisk 0230194808 tmpnam.3: Properly document tmpnam_r(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-08 09:38:08 +01:00
Wainer dos Santos Moschetta b61e3789ab strtod.3: SEE ALSO: add strfromd(3)
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:39:49 +01:00
Wainer dos Santos Moschetta e46790a80a printf.3: SEE ALSO: add strfromd(3)
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:39:43 +01:00
Wainer dos Santos Moschetta afaf39e9ac atof.3: SEE ALSO: add strfromd(3)
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:39:31 +01:00
Wainer dos Santos Moschetta 2bf84c0f98 strfroml.3: New link to strfromd(3)
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:38:53 +01:00
Wainer dos Santos Moschetta af9a175d03 strfromf.3: New link to strfromd(3)
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:38:26 +01:00
Michael Kerrisk f75bdcaf5f strfromd.3: Minor tweaks to Wainer dos Santos Moschetta's page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:37:57 +01:00
Wainer dos Santos Moschetta d8be6d2b70 strfromd.3: New page documenting strfromd(3), strfromf(3), and strfroml(3)
The ISO/IEC TS 18661-1 specifies the strfrom() class
of functions that convert a float-point value to string.

The strfromd(), strfromf(), and strfroml() functions are
introduced (commit 6962682ffe5e) in GNU C Library 2.25.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:23:58 +01:00
Michael Kerrisk 990b14c4fa sock_diag.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:09:52 +01:00
Michael Kerrisk 9e39d87df1 sock_diag.7: More minor fixes to Dmitry's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 16:09:52 +01:00
Michael Kerrisk 94dc419f1d sock_diag.7: ffix: better hanging lists
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:51:33 +01:00
Michael Kerrisk e6e0499ee0 sock_diag.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:43:47 +01:00
Michael Kerrisk e2734d296b sock_diag.7: Tweaks to Dmitry Levin's page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:40:29 +01:00
Michael Kerrisk c974db0909 sock_diag.7: ffix: white space tweaks in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:23:33 +01:00
Michael Kerrisk 6d654721b9 sock_diag.7: srcfix: rewrap long lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:19:40 +01:00
Michael Kerrisk 7133b8984b netlink.7: Rework position of NETLINK_SOCK_DIAG in list
Essentially to fix a formatting issue, where the list head
item wrapped past the 80-column limit when rendered.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:19:40 +01:00
Dmitry V. Levin 77a7e0e2bf netlink.7: Add references to sock_diag(7)
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:19:40 +01:00
Dmitry V. Levin 407bcead83 netlink.7: Document NETLINK_INET_DIAG rename to NETLINK_SOCK_DIAG
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:19:40 +01:00
Pavel Emelyanov 4f6a0a4a90 sock_diag.7: New page documenting NETLINK_SOCK_DIAG interface
Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:19:40 +01:00
Dmitry V. Levin 34caa2222e netlink.7: ffix
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 15:19:40 +01:00
Michael Kerrisk d24623ee57 close.2: Note that future POSIX plans to require that the FD is closed on error
See http://austingroupbugs.net/view.php?id=529#c1200.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 08:28:29 +01:00
Michael Kerrisk e8730f0ee7 close.2: Further reworking of discussion of error return from close()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-07 08:26:44 +01:00
Michael Kerrisk ca734d5b67 close.2: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:52:43 +01:00
Michael Kerrisk 1cab7c163d close.2: Further clarify how to treat an error return
Further clarify that an error return should be used only
for diagnostic or remedial purposes.

Lifting Linus's words freely from
http://lkml.iu.edu/hypermail/linux/kernel/0207.2/0409.html
Re: close return value (was Re: [ANNOUNCE] Ext3 vs Reiserfs benchmarks)
Date: Wed Jul 17 2002 - 12:43:57 EST

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:52:43 +01:00
Michael Kerrisk 7fe8ca51a3 close.2: Other UNIX implementations also close the FD, even if reporting an error
Looking at some historical source code (mostly from [1]) suggests
that the "close() always closes regardless of error return"
behavior has a long history, predating even POSIX.1-1990.

For example, in SVR4 for x86 (from the file sysvr4.tar.bz2 at
[1]), we see the following:

        int
        close(uap, rvp)
                register struct closea *uap;
                rval_t *rvp;
        {
                file_t *fp;
                register int error;

                if (error = getf(uap->fdes, &fp))
                        return error;
                error = closef(fp);
                setf(uap->fdes, NULLFP);
                return error;
        }

In the above, getf() can return EBADF. The other errors are
returned by closef(), but the file descriptor is deallocated
regardless of errors by setf().

A similar pattern seems to have been preserved into at least late
OpenSolaris days (verified from looking at the initial commit of
the illumos source code). There we find the following in
closeandsetf() (called by close()):

        error = closef(fp);

        setf(fd, newfp);

        return (error);

Looking at the code of closef() in AIX 4.1.3 suggests that, as on
on Linux and FreeBSD, the open file is always released, regardless
of errors.

For Irix, 6.5.5, I'm not sure (the code is not so easy to quickly
read); it may be that it does return errors while leaving the FD
open.

[1] https://archive.org/download/various_operating_system_source_code

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:52:16 +01:00
Michael Kerrisk 7155aa7750 close.2: Minor text reworking
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:16:31 +01:00
Michael Kerrisk 73c922eac8 close.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:16:31 +01:00
Michael Kerrisk 35e0ce1c58 close.2: Minor text relocation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:16:31 +01:00
Michael Kerrisk b36a3b92b6 close.2: Clarify the variation in EINTR behavior per POSIX and other systems
See also https://news.ycombinator.com/item?id=3363819
and http://www.daemonology.net/blog/2011-12-17-POSIX-close-is-broken.html

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 16:16:28 +01:00
Michael Kerrisk eb74a52bb5 close.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 15:13:57 +01:00
Michael Kerrisk b61a87d567 close.2: Rework initial paragraph in NOTES on checking close() errors
As Daniel Wagner noted, saying on the one hand that failing
to check the return value of close() is a "serious error"
seems contradicted by the next paragraph that notes that
the return value should be used for "just diagnostics".
Rework the text to resolve the apparent contradiction.

Reported-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 15:13:57 +01:00
Michael Kerrisk f65f00b085 close.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 15:00:59 +01:00
Carlos O'Donell dd9454a654 resolv.conf.5: Timeout does not map to resolver API calls
I'm posting this patch to clarify the timeout behaviour because
there have been developers who expect this timeout to mean
something it is not.

The timeout (and by proxy attempts) does not map to resolver API
calls.  For example a single call to getent might involve multiple
resolution requests to the resolvers listed in resolv.conf and
each request will use TIMEOUT and be attempted at least ATTEMPT
times. A developer using the resolver API cannot easily compute
any given timeout because the implementation may change e.g. A and
AAAA queries made in parallel.  A system administrator uses this
setting to ensure there is a desirable timeout on any request to
any of the nameservers listed in resolv.conf, but no guarantees
exist beyond that.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-06 11:40:16 +01:00
Michael Kerrisk f5f4165105 mmap.2: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 16:07:12 +01:00
Michael Kerrisk eaa8868c7b strerror.3: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 16:02:06 +01:00
Michael Kerrisk 00d82ce875 open.2: srcfix: FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 16:02:06 +01:00
Michael Kerrisk 97d8fd295f ptsname.3: Note that ptsname_r() is proposed for future inclusion in POSIX.1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 16:02:06 +01:00
Michael Kerrisk b078637007 ptsname.3: CONFORMING TO:: clarify that only ptsname() is standardized (so far)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 16:02:06 +01:00
Michael Kerrisk 2904e19a2b close.2: Further clarify that close() should not be retried after an error
See Linus ancient comments re EINTR in
    https://lkml.org/lkml/headers/2005/9/10/129
    Date	Sat, 10 Sep 2005 12:00:01 -0700 (PDT)
    From	Linus Torvalds <>
    Subject	Re: [patch 7/7] uml: retry host close() on EINTR

The FreeBSD 11.0 close() man page says similar:

    In case of any error except EBADF, the supplied file
    descriptor is deallocated and therefore is no longer valid.

For AIX:
http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf1/close.htm

    If the FileDescriptor parameter refers to a device and the
    close subroutine actually results in a device close, and the
    device close routine returns an error, the error is returned
    to the application. However, the FileDescriptor parameter is
    considered closed and it may not be used in any subsequent
    calls.

See also:
http://austingroupbugs.net/view.php?id=529
and in particular:
http://austingroupbugs.net/view.php?id=529#c1200

Reported-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 16:02:06 +01:00
Michael Kerrisk 2f3db2a58f symlink.7: SEE ALSO: add namei(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:31:37 +01:00
Michael Kerrisk def79251d4 credentials.7: SEE ALSO: add shadow(5)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:28:21 +01:00
Michael Kerrisk 540038a17d nice.2: Move discussion of handling the -1 success return to RETURN VALUE
This detail was rather hidden in NOTES. Also, rework the text
a little.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:13:33 +01:00
Michael Kerrisk 226f6909f0 nice.2: CONFORMING TO: Remove an ancient SVr4 detail on errno values
At this stage, vague details (when does EINVAL get returned?) of
ancient implementations are little more than noise in the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:13:33 +01:00
Michael Kerrisk 32ff480294 nice.2: Rework discussion of nice() return value and standards conformance
Make the text a little clearer. In particular, clarify that the
raw system call (still) returns 0 on success.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:13:33 +01:00
Michael Kerrisk 52694f0979 nice.2: Add mention of RLIMIT_NICE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:13:33 +01:00
Michael Kerrisk 360c190092 signal.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-12-05 12:13:33 +01:00