Commit Graph

9594 Commits

Author SHA1 Message Date
Michael Kerrisk f6816de988 vdso.7: Further tweaks after discussion with Mike Frysinger
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk fb634bd8da vdso.7: Clean-ups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Mike Frysinger 2800db8247 vdso.7: New page documenting the vDSO mapped into each process by the kernel
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 10850212d0 uselib.2, getfsent.3, regex.3, nsswitch.conf.5, inotify.7, man-pages.7, symlink.7: Replace uses of "e.g." in main text with "for example" or similar
Usual man-pages style is to use "e.g." only within
    parenthetical expressions.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 449dd4e2ab proc.5, unix.7: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 88879aebdd eventfd.2, set_mempolicy.2, timerfd_create.2, fwide.3, resolver.3, spufs.7, symlink.7, udplite.7, unicode.7: Replace uses of "i.e.," in main text with "that is" or similar
Usual man-pages style is to use "i.e." only within
parenthetical expressions.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 5aecfe9017 puts.3: SEE ALSO: replace reference to gets(3) with fgets(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk d098e934d0 getline.3: Remove SEE ALSO reference to unsafe gets(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk d4df4e8ad4 fgetc.3: Minor fix to ordering in SEE ALSO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 7e2b0db30f gets.3: Tweaks to David Malcolm's patch
Reported-by: Andre Majorel <aym-xunil@teaser.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk a5539262a5 gets.3: Tweaks to David Malcolm's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 42818f2072 fgetc.3, gets.3: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 845f05b519 fgets.3, getc.3, getchar.3, ungetc.3: Adjust links to gets(3) to point to fgetc(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
David Malcolm beef277092 fgetc.3, gets.3: Split gets(3) to isolate unsafe gets(3) to a page on its own
Currently man3/gets.3 documents various safe I/O functions, along
with the toxic "gets" function.

At the risk of being melodramatic, this strikes me as akin to
storing rat poison in a food cabinet, in the same style of
packaging as the food, but with a post-it note on it saying
"see warnings below".

I think such "never use this" functions should be quarantined
into their own manpages, rather than listing them alongside
sane functions.

The attached patch does this for "gets", moving the documentation
of the good functions from man3/gets.3 into man3/fgetc.3,
updating the SO links in the relevant functions to point at the
latter.

It then rewrites man3/gets.3 to spell out that "gets" is toxic
and should never be used (with a link to CWE-242 for good
measure).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 2c212ccda9 socket.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk d332f86f5a socket.2: Remove crufty statement that AF_INET does not support SOCK_SEQPACKET
Linux AF_INET supports SOCK_SEQPACKET via SCTP.

Reported-by: Dongsheng Song <dongsheng.song@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 33da1b0606 Changes: Add dedication
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:16 +13:00
Michael Kerrisk 445319fd4a close.2: Note that errors from close() should be used only for diagnosis
In particular, retrying after EINTR is a bad idea.

See http://austingroupbugs.net/view.php?id=529

See http://thread.gmane.org/gmane.comp.lib.glibc.alpha/37702
Subject: [RFC][BZ #14627] Make linux close errno to EINPROGRESS
         when interrupted in signal.

Reported-by: P?draig Brady <P@draigBrady.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 8a7ac774ba strspn.3: Improve description in NAME
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=723659

Reported-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk aefd6f899d select_tut.2, dlopen.3, err.3, printf.3: Stylistic changes to code example
For ease of reading, don't embed assignments inside if().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk b0e6462a0b printf.3: Fix memory link in snprintf() example
See http://stackoverflow.com/questions/19933479/snprintf-man-page-example-memory-leak

Reported-by: Arif Zaman <arifz@lums.edu.pk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk d102a67397 proc.5: Fix formula for CommitLimit under /proc/meminfo
See https://bugzilla.kernel.org/show_bug.cgi?id=60991

Reported-by: <sworddragon2@aol.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 213d25801a ctime.3: grfix: add some commas
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 3dd08d1d72 strptime.3: grfix: add some commas
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 77f48c37e0 strptime.3: Some rewording and reorganization
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 652d08e1fd strptime.3: Point to ctime(3) for more details on 'tm' structure
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 290bb720cd strptime.3: Add number ranges to comments in 'tm' structure
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729570

Reported-by: Mathieu Malaterre <malat@debian.org>
Reported-by: Simon Paillard <spaillard@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 17068fad8c utimensat.2: Small wording improvement for times!=NULL case
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 79e20ac183 utimensat.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 86b0ee3578 Changes.old: Fixes to 3.55 changelog
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Mike Frysinger 5e16419235 syscall.2: Fix ia64 registers
The original list of registers was created by confusing strace
source code--this is for parsing legacy 32-bit code (which is
dead and no one cares). Update the list to reflect native ia64
syscall interface.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 4cead6db49 reboot.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 3b95429be2 reboot.2: Add RB_SW_SUSPEND synonym
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk d1d5d51c06 reboot.2: Add RB_KEXEC synonym
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Elie De Brauwer 2d37a9603b reboot.2: Document LINUX_REBOOT_SW_SUSPEND
Signed-off-by: Elie De Brauwer <eliedebrauwer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Elie De Brauwer 0b23bb07a3 reboot.2: Add "Linux" to kernel version numbers
Signed-off-by: Elie De Brauwer <eliedebrauwer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Elie De Brauwer c2e32bfe27 reboot.2: Mention RB_POWER_OFF
The manpage did not mention RB_POWER_OFF which is the glibc
symbolic name for LINUX_REBOOT_CMD_POWER_OFF.

$ cd /usr/include
$ cat x86_64-linux-gnu/sys/reboot.h | grep POWER_OFF
 define RB_POWER_OFF	0x4321fedc

Signed-off-by: Elie De Brauwer <eliedebrauwer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 0566afc5af pthread_kill.3: POSIX.1-2008 removes ESRCH
POSIX.1-2001 mistakenly documented an ESRCH error, and
POSIX.1-2008 removes this error. Glibc does return
this error in cases where it can determine that a thread ID
is invalid, but equally, the use of an invalid thread ID
can cause a segmentation fault.

See http://thread.gmane.org/gmane.comp.lib.glibc.alpha/35598
Subject: Race and segmentation fault in pthread_kill() vs thread teardown
Newsgroups: gmane.comp.lib.glibc.alpha
Date: 2013-10-02 04:06:04 GMT

See http://udrepper.livejournal.com/16844.html

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Shawn Landden e8785f3de4 cmsg.3: tfix: be not --> not be
Signed-off-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk b87b8bd088 mkstemp.3: Better describe 'flags' that can be specified for mkostemp()
As reported by Janne Blomqvist:

currently the man page for mkostemp/mkostemps says:

    The mkostemp() function is like mkstemp(), with the
    difference that flags as for open(2) may be specified
    in flags (e.g., O_APPEND, O_SYNC).

To be more precise, the implementation massages the flags argument
as follows:

(flags & ~O_ACCMODE) | O_RDWR | O_CREAT | O_EXCL

That is, there is no need to explicitly include O_RDWR | O_CREAT |
O_EXCL in flags, as it's added implicitly.

So I suggest that the manpage should instead state that
*additional* flags may be specified in the flags argument.

This issue is a potential portability problem. FreeBSD 10+ also
has mkostemp{s}, but generates an error if O_RDWR | O_CREAT |
O_EXCL is present instead of silently accepting it. While
annoying, this difference in behavior seems Ok by the proposed
addition of mkostemp to some future POSIX standard, see

http://austingroupbugs.net/view.php?id=411

    The mkostemp() function shall be equivalent to the mkstemp()
    function, except that the flag argument may contain
    additional flags (from <fcntl.h>) to be used as if by open().
    Behavior is unspecified if the flag argument contains more
    than the following flags:

    O_APPEND Set append mode.

    O_CLOEXEC Set the FD_CLOEXEC file descriptor flag.

    <SIO>O_DSYNC Write according to the synchronized I/O data
    integrity completion.</SIO>

    <SIO>O_RSYNC Synchronized read I/O operations.</SIO>

    <XSI|SIO>O_SYNC Write according to synchronized I/O file
    integrity completion.</XSI|SIO>

Reported-by: Janne Blomqvist <blomqvist.janne@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 2fd2c35cc6 clock_getres.2: Improve description of CLOCK_PROCESS_CPUTIME_ID
See https://bugzilla.kernel.org/show_bug.cgi?id=67291

Reported-by:  Nadav Har'El <nyh@math.technion.ac.il>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk eb4df3a032 credentials.7: Add details on controlling terminal and foreground/background jobs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:15 +13:00
Michael Kerrisk 299eee5051 credentials.7: List APIs that operate on process groups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Peng Haitao 8cceed6998 sin.3: ATTRIBUTES: Note functions that are thread-safe
The functions sin(), sinf() and sinl() are thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Peng Haitao 598a7a2d14 sigwait.3: ATTRIBUTES: Note function that is thread-safe
The function sigwait() is thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Peng Haitao 19d5bec94f sigqueue.3: ATTRIBUTES: Note function that is thread-safe
The function sigqueue() is thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Peng Haitao 9840d4da1e sigpause.3: ATTRIBUTES: Note function that is thread-safe
The function sigpause() is thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
Peng Haitao 31c861cf30 wcpncpy.3: ATTRIBUTES: Note function that is thread-safe
The function wcpncpy() is thread safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
David Prévot cd7c700a16 perf_event_open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00
David Prévot 8fec36298f ftw.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-01-02 11:49:14 +13:00