Commit Graph

1950 Commits

Author SHA1 Message Date
Michael Kerrisk 01c0d450f9 memccpy.3: Fix CONFORMING TO: s/C99/POSIX.1-2001/
Reported-by: Mads Martin Joergensen <mmj@mmj.dk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-14 10:41:53 +13:00
Michael Kerrisk 497be851c2 memccpy.3: If the memory areas overlap, the results are undefined
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-14 10:41:53 +13:00
Michael Kerrisk e739a26839 setjmp.3: Clarify when setjmp() provides BSD vs System V signal mask semantics
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-14 10:41:44 +13:00
Michael Kerrisk 1192ed9476 longjmp.3, setjmp.3: Clarify wording re saving/restoring signal mask
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-14 10:41:43 +13:00
Michael Kerrisk 78604af5bf longjmp.3: siglongjmp() only restores signal mask iff 'savesigs' was non-zero
Note that siglongjmp() only restores signal mask if, and only
if, 'savesigs' argument of sigsetjmp() was non-zero.  (Previous
text omitted the "and only if".)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-14 10:41:31 +13:00
Adeodato Simó c1f3b740e8 malloc.3: tfix: RETURN VALUE: s/realloc/calloc/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 13:50:08 +13:00
Michael Kerrisk 2c4432fc51 gethostid.3: tstamp 2009-01-13 08:52:13 +13:00
Michael Kerrisk c18ecec98b dlopen.3, ld.so.8: SEE ALSO: add rtld-audit(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:47:47 +13:00
Michael Kerrisk 24ad017de2 clock_getres.3: SEE ALSO: Add pthread_getcpuclockid(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:49 +13:00
Michael Kerrisk 0d6cdbf56d pthread_getcpuclockid.3: minor: remove extraneous source comment
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:49 +13:00
Michael Kerrisk c0d72e9ef9 pthread_getcpuclockid.3: New page documenting pthread_getcpuclockid(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:49 +13:00
Michael Kerrisk f9d5bb737b gethostid.3: Before version 2.2, glibc stored the host ID in /var/adm/hostid
Also: rewrite some text describing the /etc/hostid file, so that
this location is referred to just once on the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:48 +13:00
Michael Kerrisk 4c98d1203b gethostid.3: Added ERRORS section describing errors for sethostid()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:48 +13:00
Michael Kerrisk 0482681627 gethostid.3: RETURN VALUE: describe return value of sethostid()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:48 +13:00
Michael Kerrisk 9caf825633 gethostid.3: Minor wording improvements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:47 +13:00
Michael Kerrisk 525748e03a gethostid.3: Added BUGS section noting that ID can't be guaranteed to be unique
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:47 +13:00
Michael Kerrisk 963efe88c5 gethostid.3: Update section number to reflect relocation into Section 3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 08:37:31 +13:00
Michael Kerrisk a1096a314e sethostid.3: New link to relocated page in Section 3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 07:04:35 +13:00
Michael Kerrisk 1f4f66a924 gethostid.2: Move to Section 3
The interfaces documented in this page are purely glibc.

Reported-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-13 07:00:44 +13:00
Florentin Duneau de90951b73 CPU_SET.3: tfix
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510507.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2009-01-12 23:22:09 +13:00
Michael Kerrisk 08f8825735 printf.3: Source and destination buffers may not overlap for *s*printf()
http://sourceware.org/bugzilla/show_bug.cgi?id=7075

Some existing code relies on techniques like the following to
append text to a buffer:

    $ cat s.c
    #include <stdio.h>
    char buf[80] = "not ";
    main()
    {
        sprintf(buf, "%sfail", buf);
	puts(buf);
	return 0;
    }

    $ cc s.c
    $ ./a.out
    not fail

However, the standards say the results are undefined if source
and destination buffers overlap, and with suitable compiler
options, recent changes can cause unexpected results:

    $ cc -v 2>&1 | grep gcc
    gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux)
    $ cc -D_FORTIFY_SOURCE -O2 s.c
    $ ./a.out
    fail

Reported-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-19 11:47:04 -05:00
Petr Baudis 4209865fa4 crypt.3: ffix
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-19 10:03:18 -05:00
Michael Kerrisk 6a5dd8b393 readdir.3: Clarify text for return value/errno setting for end-of-stream case
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-19 09:36:12 -05:00
Michael Kerrisk 4b3caf6feb readdir.3: Rewrite text describing 'dirent' fields standardized in POSIX.1 2008-12-19 09:00:58 -05:00
Petr Baudis 450c838664 dlopen.3: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-06 12:11:51 -05:00
Michael Kerrisk 16625773f9 fmemopen.3: Fix VERSIONS information
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Petr Baudis <pasky@suse.cz>
2008-12-06 12:03:31 -05:00
Michael Kerrisk 8ccde1f0a5 Removed trailing white space at end of lines 2008-12-05 22:53:52 -05:00
Michael Kerrisk 5cedb08f41 bindresvport.3: Fix errors regarding port used, plus other rewrites
Glibc's bindresvport() takes no notice of sin->sin_port:
it always returns an arbitrary reserved port in the
anonymous range (512-1023).  (Reported by Mats Wichmann.)

Also:
* Add EADDRINUSE and EACCES errors.
* Mention use of getsockname(2).
* Other minor rewrites and reorderings of the text.
* Explicitly note that glib's bindresvport() ignores
  sin->sin_port.
* Change license There's now virtually no text remaining from
  the 1.70 version of this page.

Reported-by: Mats Wichmann <mats.d.wichmann@intel.com>
Reviewed-by: Mats Wichmann <mats.d.wichmann@intel.com>
Reviewed-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:26 -05:00
Michael Kerrisk 6eb334b2cf bind.2, rcmd.3, capabilities.7, ip.7: Global fix: s/reserved port/privileged port/
Some pages used one term, some pages the other term;
make some consistency.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:26 -05:00
Michael Kerrisk 97aec57c6f setlocale.3, locale.7: Clean up the description of LANGUAGE environment variable
Clean up the $LANGUAGE description, by removing bogus comments
from setlocale(3) and expanding the mention in locale(7).

Maybe you will decide that a more detailed description should be left
to the gettext(3) documentation, but I actually care about the invisible
part of the patch more since the comments have put me off the track
initially ($LANGUAGE has nothing to do with setlocale(3) and is
completely isolated to gettext, as obvious from the glibc sources).

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:25 -05:00
Michael Kerrisk f439817725 dlopen.3: wsfix 2008-12-05 22:47:25 -05:00
Michael Kerrisk 1d2c48b3a7 dlopen.3: ffix 2008-12-05 22:47:25 -05:00
Petr Baudis 27a61e8622 dlopen.3: Describe confusing dladdr() behavior
dladdr() will act unexpectedly if called from non-pic code on a
compile-time-generated function pointer:

    /* test_dladdr.c */

    #define _GNU_SOURCE
    #include <dlfcn.h>
    #include <stdio.h>

    int
    main(void)
    {
        void *func;
        Dl_info info = {};

        func = printf;
        dladdr(func, &info);
        printf("%s at %p resolved from %s\n", info.dli_sname,
                func, info.dli_fname);

        return 0;
    }

    $ cc test_dladdr.c -ldl
    $ ./a.out
    printf at 0x804838c resolved from ./a.out
    $ cc -fPIC test_dladdr.c -ldl
    $ ./a.out
    _IO_printf at 0xb7f71c30 resolved from /lib/libc.so.6

In the long term, it might make sense to make dladdr() recognize
plt pointers and recurse, but I'm too afraid of Ulrich ;-)
(and he seems to be heavy proponent of pic code anyway, so
the chances for that to be accepted probably aren't high).

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:25 -05:00
Michael Kerrisk 8461e2c703 memmem.3: Remove sentence saying that libc 5.0.9 is still widely used
That was a *long* time ago.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:23 -05:00
Michael Kerrisk 6a02322941 memmem.3: grfix wfix 2008-12-05 22:47:23 -05:00
Michael Kerrisk f84addeb7f memmem.3: ffix 2008-12-05 22:47:23 -05:00
Michael Kerrisk 4f9ea6c361 fmemopen.3: minor: wording tweak
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:22 -05:00
Michael Kerrisk 99111b7580 fmemopen.3: ffix 2008-12-05 22:47:22 -05:00
Petr Baudis 8a4051693d open_wmemstream.3: New link to fmemopen.3
fmemopen.3 now documents open_wmemstream().

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:22 -05:00
Michael Kerrisk 45906a480f fmemopen.3: Add VERSIONS section
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:22 -05:00
Petr Baudis 3a0f269da2 fmemopen.3: Add description of open_wmemstream(3)
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:21 -05:00
Petr Baudis 00269a5a24 getaddrinfo.3: Document results ordering and /etc/gai.conf
This patch documents the order of the getaddrinfo(3) results
(RFC 3484), how should the application deal with that,
mentions the extremely common cause of having multiple
results per query (both IPv4 and IPv6 addresses available)
and mentions /etc/gai.conf.

(mtk: Minor tweaks, and note glibc version for /etc/gai.conf)

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:21 -05:00
Petr Baudis a2f86747f1 fopencookie.3: fopencookie() needs _GNU_SOURCE feature test macro
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:21 -05:00
Petr Baudis 5f0aa64a2e fopen.3: SEE ALSO: Add fmemopen(3) and fopencookie(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:21 -05:00
Petr Baudis da607ba120 fmemopen.3: SEE OPEN: Add fopencookie(3)
fopencookie(3) is used to implement fmemopen().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:20 -05:00
Michael Kerrisk 2656acee7d atexit.3: Calling exit(3) more than once produces undefined results
If an exit handler itself calls exit(3), the results are
undefined (see the POSIX.1-2001 specification of exit(3)).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:20 -05:00
Michael Kerrisk db217984ec atexit.3: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:20 -05:00
Michael Kerrisk ee394477fa atexit.3: The same exit handler may be registered multiple times
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:20 -05:00
Michael Kerrisk 41bf770ca3 atexit.3: Calling _exit(2) terminates processing of exit handlers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:20 -05:00
Michael Kerrisk 374b9a8f7b atexit.3: atexit() and on_exit(3) register functions on the same list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-12-05 22:47:19 -05:00