perf_event_open.2: srcfix: add FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
getrlimit.2, mmap.2, stat.2, unimplemented.2, dbopen.3, ecvt_r.3, fopen.3, fts.3, getcontext.3, qecvt.3, ip.7, ld.so.8: grfix: Add Oxford comma

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
open.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
packet.7: Fix include file

It looks like most of the socket options from this man pages
are not defined in <netpacket/packet.h>. They are defined in
<linux/if_packet.h> so we should include that one.

Note from mtk: it looks like <netpacket/packet.h> was based
on some ancient version of <linux/if_packet.h> that has not
been updated. Since linux/if_packet.h is under the "uapi" tree
the proposed patch seems the bext fix.

Signed-off-by: Sorin Dumitru <sdumitru@ixiacom.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
poll.2, select.2: fix erroneous description of "available for write".

POSIX says: "POLLOUT Normal data may be written without
blocking.".  This is "may" is misleading, see the POSIX
write page:

    Write requests to a pipe or FIFO shall be handled in the
    same way as a regular file with the following exceptions:
    ...
    If the O_NONBLOCK flag is clear, a write request may cause
    the thread to block, but on normal completion it shall
    return nbyte.
    ...
    When attempting to write to a file descriptor (other than a
    pipe or FIFO) that supports non-blocking writes and cannot
    accept the data immediately:

    If the O_NONBLOCK flag is clear, write() shall block the
    calling thread until the data can be accepted.

    If the O_NONBLOCK flag is set, write() shall not block the
    thread. If some data can be written without blocking the
    thread, write() shall write what it can and return the
    number of bytes written. Otherwise, it shall return -1 and
    set errno to [EAGAIN].

The net result is that write() of more than 1 byte on a
socket, pipe or FIFO which is "ready" may block: write()
(unlike read!) will attempt to write the entire buffer and
only return a short write under exceptional circumstances.

Indeed, this is the behaviour we see in Linux:

https://github.com/rustyrussell/ccan/commit/897626152d12d7fd13a8feb36989eb5c8c1f3485
https://plus.google.com/103188246877163594460/posts/BkTGTMHDFgZ

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
rtnetlink.3: Fix parameters for the send() call in the example

Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>