Commit Graph

16345 Commits

Author SHA1 Message Date
Michael Kerrisk 6c79a020fa sigprocmask.2: Minor fixes to Keno Fischer's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-28 17:48:12 +12:00
Keno Fischer 86d5ed87d3 sigprocmask.2: Expand/clarify libc/kernel sigset_t difference
Expand and clarify libc/kernel sigset_t differences.  Also move
up the signature for rt_sigprocmask, similar to the way this is
done in clone.2.

Due to the history of sigprocmask, there are various notions of
what sigset_t refers to. This attempts to clarify the man page,
by giving the major instances different names:

- sigset_t is the glibc sigset_t (1024 bits)
- kernel_sigset_t is the kernel's sigset_t (64 bits)
- old_kernel_sigset_t is the pre-rt kernel's sigset_t (32 bits)

and explaining their difference in the NOTES. Even though the
sources do not refer to the various sigset_t's by these names, I
think it is important to be explicit, esp since sizeof(sigset_t)
would give an incorrect value for `sigsetsize` if written in a
source file that includes the libc headers.

Lastly, move the note on an incorrect `sigsetsize` causing
EINVAL up to the ERRORS section, so everything is in one place.
2016-08-28 17:42:52 +12:00
Ruben Kerkhof 48bafe7c02 readdir_r(3): tfix: Fix reference to readdir(3) 2016-08-28 16:38:31 +12:00
Michael Kerrisk 49dba87f5c clone.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-24 11:47:52 +12:00
Michael Kerrisk db8ba2b415 clone.2: Make the implications of CLONE_FILES more explicit
If CLONE_FILES is not set, the duplicated FDs nevertheless share
file offset and status flags via the open file description.

Reported-by: Elliott Hughes <enh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-24 11:47:45 +12:00
Michael Kerrisk 6a459f6fee fcntl.2: Minor wording fix for F_DUPFD
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-24 11:29:35 +12:00
Michael Kerrisk 4529738e46 accept.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 19:45:16 +12:00
Michael Kerrisk dc1f897234 ip.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 18:26:12 +12:00
Michael Kerrisk 173fa792d5 ip.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 18:21:03 +12:00
Michael Kerrisk a2bb780cf0 ddp.7: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 16:46:20 +12:00
Michael Kerrisk bb05e249ae ddp.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 16:44:24 +12:00
Michael Kerrisk c1aac5e301 fifo.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 10:27:00 +12:00
Michael Kerrisk a376f4f068 termcap.5: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 10:24:05 +12:00
Michael Kerrisk ccdf8bc04f accept.2: Demote discussion of DECNet to NOTES
DECNet ceased to be important long ago...

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 10:03:31 +12:00
Michael Kerrisk cb1bcdf28c accept.2: Mention epoll(7) alongside poll()/select()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-23 10:01:58 +12:00
Michael Kerrisk 692b4bcca6 fanotify_init.2: Update BUGS information
Patch 0b37e097a648aa71d4db1ad108001e95b69a2da4 was included
in Linux 3.18.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2016-08-22 07:18:24 +12:00
Michael Kerrisk cc6e4bf0cf readlink.2: Make example program handle links that report a size of zero
Some "magic" symlinks created by the kernel (e.g., those under
/proc and /sys) report 'st_size' as zero. Modify the example
program to handle that possibility.

Reported-by: Ursache Vladimir <f35f22fan@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-20 15:27:13 +12:00
Michael Kerrisk e9979dff7c readlink.2: Emphasize that truncation of returned buffer generates no error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-20 15:02:06 +12:00
Michael Kerrisk 1a0dff18b2 capabilities.7: Minor tweaks to Matthew Saunders' patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-20 11:37:42 +12:00
Michael Kerrisk 1f601b1c28 capabilities.7: Add note about nosuid to file capabilities section 2016-08-20 11:31:26 +12:00
Michael Kerrisk efcf47adbd makedev.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-18 09:59:24 +12:00
David Turner 41185b1261 cpuset.7: tfix 2016-08-17 17:07:32 +12:00
Michael Kerrisk bf525e9050 mmap.2: Small improvement to description of MAP_SHARED
See https://sourceware.org/bugzilla/show_bug.cgi?id=6887

Reported-by: Siward de Groot <siward@wanadoo.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-17 08:09:28 +12:00
Michael Kerrisk 7b032b2398 open.2: Minor layout fix in ERRORS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-17 08:09:28 +12:00
Michael Kerrisk 61775a254e fifo.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-17 08:09:28 +12:00
Michael Kerrisk f62ddda8a4 fcntl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-17 08:09:28 +12:00
Michael Kerrisk aa30354a3b select_tut.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Michael Kerrisk a686506533 ptrace.2: ffix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Peter Wu 3c3d1f83f9 select_tut.2: fix issues in example
Avoid closing cfd if it is -1. Initialize buf1_avail, etc. to avoid
uninitialized memory access in the event that accept() fails. Remove
redundant setting of nfds. Fix tabs with spaces.

Do not try to read/write from/to file descriptors once an existing
connection is overwritten, the select() states are stale now.
Avoid writing zero bytes from the buffer and then closing the fd.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2016-08-12 07:14:42 +12:00
Ray Bellis 519303a6a4 resolver.3: Correct arguments to res_ninit(res_state statep)
The man page for res_ninit() incorrectly says that it takes no
parameters, when in fact (and indeed according to the same page
further down) it has to take a res_state parameter.
2016-08-12 07:14:42 +12:00
Michael Kerrisk a9672faabc fmemopen.3: Remove bogus suggestion to use setbuffer()
As Rich Felker comments:

    The stdio buffer associated with the fmemopen-obtained FILE,
    and the output memory buffer into which it's writing, are
    conceptually distinct entities, and there is no reason to
    expect reasonable results if you modify the contents of a
    setvbuf-associated buffer through other means while it's
    associated with a FILE.

See http://stackoverflow.com/questions/38854163/using-rewind-on-a-file-opened-with-fmemopen

Reported-by: Rich Felker <dalias@libc.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Jann Horn 423cb9f7ff mmap.2: Describe treatment of 'offset' for MAP_ANONYMOUS
The manpage claimed that the offset argument is ignored, and when
I interpreted that as "I don't need to set that register when
doing the syscall", I got failures. I was able to spot two reasons
for that:

What I probably ran into:
At least on x86-64, sys_mmap (in arch/x86/kernel/sys_x86_64.c)
always checks that the offset is page-aligned, even for
MAP_ANONYMOUS.

Another one, could probably trigger on 32-bit x86:
In do_mmap(), there is a check to ensure that pgoff together with
the allocation length won't cause an overflow, even for
MAP_ANONYMOUS.

Document that userspace should pass in zero, since that's
probably what everyone is doing already. (It would also be
possible to describe the constraints on the offset more
carefully, but zero works, and nobody should need to pass in
anything else.)

Signed-off-by: Jann Horn <jann@thejh.net>
2016-08-12 07:14:42 +12:00
Michael Kerrisk 1bceaaee94 glob.7: Clarify that syntactically incorrect patterns are left unchanged
Reported-by: Arnaud Gaillard <arnaud.mgaillard@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Michael Kerrisk b6264ec7cd syscall.2: Eliminate groff "cannot adjust line" warnings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Michael Kerrisk 2a69e8175e ascii.7: Eliminate groff "cannot adjust line" warnings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Michael Kerrisk 999f6d03db mouse.4: Eliminate groff "cannot adjust line" warnings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-12 07:14:42 +12:00
Michael Kerrisk 3fd5b1e7d2 wait.2: Remove erroneous statement that waitpid() is implemented via wait4()
There is a fallback to wait4(), but only if the kernel does
not provide a waitpid() system call.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk 3e752456ba gettid.2: Minor fix: remove self-reference from SEE ALSO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk 760fc1e8f3 pldd.1: Note gdb(1) command that can be used as a replacement for pldd
Taken from Carlos O'Donnell's suggestion in
https://sourceware.org/bugzilla/show_bug.cgi?id=18035#c2

Reported-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk 25a306f113 pldd.1: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Jakub Wilk ae34c5215d proc.5: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2016-08-08 05:54:16 +10:00
Michael Kerrisk ecc9535d8e proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk d9e64b422f fsync.2: SEE ALSO: add pwritev(2)
Since Linux 4.7, pwritev() has flags related to I/O
integrity completion.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk 4ad958e183 proc.5: Document /proc/meminfo '+ShmemHugePages' and 'ShmemPmdMapped' fields
New in Linux 4.8

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk a4680ab51d user_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk afdd425e68 towlower.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk 9f7a5b0e57 sigset.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk 119a385181 resolver.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk fca8d7eb25 readdir_r.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00
Michael Kerrisk ab57579b8b ioctl_fat.2: f
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-08 05:54:16 +10:00