Commit Graph

4318 Commits

Author SHA1 Message Date
Michael Kerrisk 62c76ace78 memusage.1, memusagestat.1, connect.2, fcntl.2, poll.2, errno.3, rtnetlink.3, inotify.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-09-07 05:03:19 -07:00
Rusty Russell d2e7d1bb58 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:

897626152d
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>
2014-09-01 19:36:03 +02:00
Christian von Roques f36a14687b open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-09-01 19:07:04 +02:00
Michael Kerrisk 9af134cdeb 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>
2014-09-01 17:57:07 +02:00
Michael Kerrisk 229c33a1d3 perf_event_open.2: srcfix: add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-09-01 17:52:05 +02:00
Michael Haardt 977e3384e5 connect.2: Note that a new socket should be used if connect() fails
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-21 17:07:18 -05:00
Michael Kerrisk bea08fec7e adjtimex.2, bind.2, cacheflush.2, clone.2, fallocate.2, fanotify_init.2, fanotify_mark.2, flock.2, futex.2, getdents.2, getpriority.2, getrlimit.2, gettid.2, gettimeofday.2, ioprio_set.2, kexec_load.2, migrate_pages.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, msgop.2, nfsservctl.2, perf_event_open.2, pread.2, ptrace.2, recvmmsg.2, rename.2, restart_syscall.2, sched_setattr.2, send.2, shmop.2, shutdown.2, sigaction.2, signalfd.2, syscalls.2, timer_create.2, timerfd_create.2, tkill.2, vmsplice.2, wait.2, aio_init.3, confstr.3, exit.3, fmemopen.3, fopen.3, getaddrinfo.3, getauxval.3, getspnam.3, isalpha.3, isatty.3, mallinfo.3, malloc.3, mallopt.3, psignal.3, pthread_attr_setinheritsched.3, qecvt.3, queue.3, rtnetlink.3, strerror.3, strftime.3, toupper.3, towlower.3, towupper.3, initrd.4, locale.5, proc.5, bootparam.7, capabilities.7, ddp.7, fanotify.7, icmp.7, inotify.7, ip.7, ipv6.7, netdevice.7, netlink.7, path_resolution.7, rtld-audit.7, rtnetlink.7, sched.7, signal.7, socket.7, svipc.7, tcp.7, unix.7, ld.so.8: srcfix: Update FIXMEs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-21 16:47:44 -05:00
Michael Kerrisk 9bcc9e428c fcntl.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-21 13:48:32 -05:00
Michael Kerrisk 37c240d14c fcntl.2: One must define _GNU_SOURCE to get the F_OFD_* definitions
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-21 13:47:25 -05:00
Michael Kerrisk 9bbf6fbf5a swapon.2: srcfix: add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-21 11:29:26 -05:00
Michael Kerrisk ef4f4031ca Removed trailing white space at end of lines 2014-08-19 12:01:21 -05:00
Michael Kerrisk 8980a50087 access.2, bdflush.2, bind.2, brk.2, chmod.2, chown.2, clone.2, epoll_wait.2, execve.2, fsync.2, getgroups.2, gethostname.2, getpagesize.2, getpriority.2, getrlimit.2, ioperm.2, kexec_load.2, link.2, mkdir.2, mmap.2, msgop.2, perf_event_open.2, process_vm_readv.2, ptrace.2, readlink.2, readv.2, recv.2, rename.2, sched_setaffinity.2, select.2, send.2, seteuid.2, signal.2, sigwaitinfo.2, stat.2, symlink.2, sync.2, sync_file_range.2, sysinfo.2, timer_create.2, uname.2, unlink.2, utime.2, wait.2, abs.3, atoi.3, catopen.3, cerf.3, cexp2.3, clearenv.3, clog2.3, ctime.3, des_crypt.3, ecvt.3, fgetgrent.3, flockfile.3, fseeko.3, ftime.3, ftok.3, ftw.3, getauxval.3, getcwd.3, getdtablesize.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, getline.3, getpass.3, getutent.3, glob.3, insque.3, lseek64.3, memmem.3, mkstemp.3, mktemp.3, on_exit.3, openpty.3, putenv.3, qecvt.3, realpath.3, remove.3, setbuf.3, sigpause.3, strftime.3, strptime.3, strstr.3, strtod.3, tzset.3, updwtmp.3, xcrypt.3, core.5, utmp.5, capabilities.7, charsets.7, environ.7, ipv6.7, man-pages.7, packet.7, vdso.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-19 11:55:41 -05:00
Michael Kerrisk e1c083b606 getgroups.2: SEE ALSO: add group_member(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:20:49 -05:00
Michael Kerrisk b9311895da seteuid.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:51 -05:00
Michael Kerrisk 0e8cfea791 readv.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:51 -05:00
Michael Kerrisk d8ae75789f msgop.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:51 -05:00
Michael Kerrisk ed86e39a63 getpagesize.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:50 -05:00
Michael Kerrisk a82507ce75 execve.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:50 -05:00
Michael Kerrisk 47709e55b3 utime.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:49 -05:00
Michael Kerrisk 64e67357e2 sync.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:49 -05:00
Michael Kerrisk 7537792e3a sync.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:49 -05:00
Michael Kerrisk 63f70e10fc signal.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 30a63ffaeb signal.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 1e95d1ba13 shmop.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk a4a6fd7459 send.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 565ee7678e select.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 083e5b2f39 select.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 7e09b555e5 select.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk e6f84c8f8c recv.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 5ef6332e7b recv.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk abaa5fb051 ioperm.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk cf17af8246 clone.2: Remove ancient Linux libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 531bbb0fbe sysinfo.2: Add VERSIONS section
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 4bc6c6c982 sysinfo.2: Remove ancient libc details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk b81463d687 kexec_load.2: Add KEXEC_ARCH_68K to list of architectures for 'flags'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 0fe0cc46d5 kexec_load.2: Note limit of 16 for 'nr_segments'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk d0e37bbc4a kexec_load.2: Reword description of 'flags' a little
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 7d14eaf1a1 kexec_load.2: Clarify the 'flags' bits that contain the architecture
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 029770dcd2 seteuid.2: Add "libc/kernel ABI differences" subheading
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 63a1f6e183 sigwaitinfo.2: The raw sigtimedwait() system call has a fifth argument
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 93a3b5ca7b getrlimit.2: Glibc's setrlimit() and getrlimit() are implemented using prlimit()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 7add6ac9a4 getrlimit.2: Describe the "large" resource limit bug on 32-bit platforms
See https://bugzilla.kernel.org/show_bug.cgi?id=5042.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 9bd519776f getrlimit.2: srchfix: Add further details on prlimit() commits
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 4711f72291 getrlimit.2: Add cross reference to core(5) in discussion of RLIMIT_CORE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk 23ab261583 symlink.2: Glibc falls back to symlink() on kernels that lack symlinkat() 2014-08-18 17:01:48 -05:00
Michael Kerrisk d20e418098 unlink.2: Glibc falls back to unlink() or rmdir() on kernels that lack unlinkat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:48 -05:00
Michael Kerrisk cf81f364e8 access.2: Glibc falls back to using access() on kernels that lack faccessat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:47 -05:00
Michael Kerrisk c71a9ed732 link.2: Glibc falls back to link() on kernels that lack linkat()
Unless 'flags' contains AT_SYMLINK_FOLLOW.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:47 -05:00
Michael Kerrisk 1e40dbf524 readlink.2: Glibc falls back to readlink() on kernels that lack readlinkat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:47 -05:00
Michael Kerrisk 375ef2862f chown.2: Glibc falls back to chown()/lchown() on kernels that lack fchownat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2014-08-18 17:01:47 -05:00