Commit Graph

6260 Commits

Author SHA1 Message Date
Jakub Wilk 995eea2293 strtol.3, strtoul.3: SEE ALSO: add strtoimax(3), strtoumax(3)
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-08 16:19:00 +01:00
Michael Kerrisk 9ba0180298 getent.1, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1, _syscall.2, accept.2, add_key.2, adjtimex.2, bind.2, bpf.2, capget.2, chown.2, chroot.2, clock_getres.2, clone.2, connect.2, copy_file_range.2, epoll_ctl.2, epoll_wait.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fcntl.2, fsync.2, futex.2, getcpu.2, getdents.2, getgid.2, getgroups.2, getpid.2, gettid.2, gettimeofday.2, getuid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, ioctl_fat.2, ioctl_ns.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, madvise.2, memfd_create.2, migrate_pages.2, mount.2, mprotect.2, mremap.2, msgctl.2, msgop.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pipe.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, readahead.2, readdir.2, readlink.2, reboot.2, recvmmsg.2, removexattr.2, rename.2, request_key.2, s390_guarded_storage.2, s390_runtime_instr.2, s390_sthyi.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, seccomp.2, select.2, select_tut.2, semctl.2, sendmmsg.2, set_thread_area.2, setgid.2, setns.2, setuid.2, setxattr.2, shmctl.2, sigaction.2, signalfd.2, sigsuspend.2, socket.2, socketpair.2, spu_run.2, stat.2, statx.2, subpage_prot.2, syscalls.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, vmsplice.2, write.2, CPU_SET.3, __ppc_get_timebase.3, alloca.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bsd_signal.3, bstring.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, cmsg.3, confstr.3, ctermid.3, ctime.3, des_crypt.3, dl_iterate_phdr.3, dlinfo.3, dlsym.3, duplocale.3, end.3, endian.3, errno.3, exec.3, exit.3, ferror.3, fgetws.3, fmemopen.3, fnmatch.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getmntent.3, getnameinfo.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, isatty.3, iswblank.3, iswspace.3, lockf.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, putenv.3, qsort.3, rand.3, random.3, readdir.3, regex.3, resolver.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcmp.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, system.3, termios.3, trunc.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, xcrypt.3, console_codes.4, dsp56k.4, full.4, initrd.4, lirc.4, loop.4, st.4, tty.4, vcs.4, charmap.5, core.5, host.conf.5, locale.5, proc.5, repertoiremap.5, resolv.conf.5, termcap.5, tmpfs.5, tzfile.5, aio.7, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, complex.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, locale.7, man-pages.7, man.7, namespaces.7, pid_namespaces.7, pkeys.7, pthreads.7, rtld-audit.7, sched.7, signal.7, sock_diag.7, socket.7, tcp.7, udp.7, unicode.7, user_namespaces.7, utf-8.7, zdump.8, zic.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-06 15:12:10 +01:00
Michael Kerrisk b628f896e5 dlsym.3: Describe a case where a symbol value may be NULL
Remove a longstanding mystery in the text of the page, by
explaining a case where the value returned for a symbol may be
NULL. (However, there are presumably other cases, since the text
in the dlsym(3) manual page pre-dates the invention of IFUNCs.)

See also
https://stackoverflow.com/questions/13941944/why-can-the-value-of-the-symbol-returned-by-dlsym-be-null

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-06 15:00:49 +01:00
Michael Kerrisk d1a719857b locale.1, memusage.1, pldd.1, _syscall.2, add_key.2, bind.2, bpf.2, chown.2, clone.2, copy_file_range.2, eventfd.2, execve.2, futex.2, getdents.2, getrlimit.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, membarrier.2, memfd_create.2, mmap.2, mprotect.2, msgop.2, open_by_handle_at.2, perf_event_open.2, pipe.2, readdir.2, readlink.2, readv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, select_tut.2, sendmmsg.2, setns.2, signalfd.2, spu_run.2, stat.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, wait.2, CPU_SET.3, __ppc_get_timebase.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, confstr.3, ctime.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, end.3, endian.3, fgetws.3, fmemopen.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, iswblank.3, iswspace.3, makecontext.3, mallinfo.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, qsort.3, rand.3, readdir.3, regex.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strftime.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, termios.3, tsearch.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, console_codes.4, dsp56k.4, full.4, initrd.4, loop.4, vcs.4, charmap.5, core.5, elf.5, locale.5, proc.5, repertoiremap.5, sysfs.5, termcap.5, aio.7, bpf-helpers.7, cgroups.7, charsets.7, complex.7, fanotify.7, feature_test_macros.7, inotify.7, locale.7, man-pages.7, man.7, pkeys.7, pthreads.7, rtld-audit.7, sock_diag.7, unix.7, user_namespaces.7, utf-8.7: Use '\e' rather than '\\' to get a backslash
Quoting Branden:

*roff escape sequences may sometimes look like C escapes, but that
is misleading.  *roff is in part a macro language and that means
recursive expansion to arbitrary depths.

You can get away with "\\" in a context where no macro expansion
is taking place, but try to spell a literal backslash this way in
the argument to a macro and you will likely be unhappy with
results.

Try viewing the attached file with "man -l".

"\e" is the preferred and portable way to get a portable "escape
literal" going back to CSTR #54, the original Bell Labs troff
paper.

groff(7) discusses the issue:

  \\     reduces to a single backslash; useful to delay its
         interpretation as escape character in copy mode.  For a
         printable backslash, use \e, or even better \[rs], to be
         independent from the current escape character.

As of groff 1.22.4, groff_man(7) does as well:

  \e     Widely used in man pages to represent a backslash output
         glyph.  It works reliably as long as the .ec request is
         not used, which should never happen in man pages, and it
         is slightly more portable than the more exact ‘\(rs’
         (“reverse solidus”) escape sequence.

People not concerned with portability to extremely old troffs should
probably just use \(rs (or \[rs]), as it means "the backslash
glyph", not "the glyph corresponding to whatever the current escape
character is".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 15:32:50 +01:00
Michael Kerrisk 8fb01fdeac adjtimex.2, futex.2, mremap.2, seccomp.2, getnameinfo.3, random.3, console_codes.4, sysfs.5, sched.7, unicode.7: Use zero‐width space in appropriate locations
Quoting Branden:

    *roff systems will interpret the period in the unpatched
    page as sentence-ending punctuation and put inter-sentence
    spacing after it.  (This might not be visible on
    nroff/terminal devices, but it is more likely to be on
    typesetter/PostScript/PDF output).

    groff_man(7) in groff 1.22.4 attempts to throw man page
    writers a bone here:

     \&     Zero‐width space.  Append to an input line to prevent
            an end‐of‐ sentence punctuation sequence from being
            recognized as such, or insert at the beginning of an
            input line to prevent a dot or apostrophe from being
            interpreted as the beginning of a roff request.

Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 15:32:41 +01:00
Bjarni Ingi Gislason ce3fe8a1bb fseeko.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 11:12:17 +01:00
Michael Kerrisk 4b39c270a6 malloc.3: srcfix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 11:09:46 +01:00
Michael Kerrisk a9163c20c6 pthread_mutex_consistent.3: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 11:04:19 +01:00
Michael Kerrisk 68c63bfd76 scanf.3: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:59:42 +01:00
Michael Kerrisk dbe840685d signbit.3: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:57:15 +01:00
Bjarni Ingi Gislason d8a86e74a2 man3/t-v.3: srcfix: Use a single-font-style macro for a single argument
Use a single-font-style macro (".B", ".I") for a single argument.

  Remove unneeded quotation marks (").

  The output from "nroff" and "groff" is unchanged, except for the change

1) '-1' to '\-1' in the file "timegm.3"

2) to separate ',' from a word in the file "uselocale.3".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:55:54 +01:00
Michael Kerrisk 2d20cb1b97 wcsncmp.3: ffix
Reported-by: wcsncmp.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:53:15 +01:00
Michael Kerrisk d8012462d7 fallocate.2, futex.2, getrandom.2, mprotect.2, posix_spawn.3, address_families.7, ipv6.7, sock_diag.7, socket.7: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:31:55 +01:00
Michael Kerrisk b30b425ba1 fallocate.2, getgid.2, getpid.2, getuid.2, lseek.2, set_thread_area.2, tzset.3: srcfix: fix some unconventional markup
No (intended) changes to generated output

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:03:58 +01:00
Michael Kerrisk 6614e29264 keyctl.2, mlock.2, timerfd_create.2, write.2, nl_langinfo.3, posix_spawn.3: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-27 10:00:28 +01:00
Michael Kerrisk 20c1350300 exec.3: execv(3) does not use execv(2) on sparc/sparc64
Reported-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-26 13:07:59 +01:00
Michael Kerrisk 4cdc879a59 des_crypt.3, encrypt.3: The functions described in these pages are removed in glibc 2.28
These functions were removed because they use DES, which is no
longer considered secure.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-26 10:31:11 +01:00
Michael Kerrisk 2d224c30bc isatty.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-26 09:24:42 +01:00
Michael Kerrisk 44e9941b97 isatty.3: Most non-tty files nowadays result in the error ENOTTY
Historically, at least FIFOs and pipes yielded the error EINVAL.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-25 15:39:59 +01:00
Michael Kerrisk 46aa14ee8e exec.3: Note that SPARCC provides an execv() system call
Reported-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-02-25 12:54:54 +01:00
Michael Kerrisk ebbb02651e bstring.3: Correct argument list for memmem() prototype
Reported-by: Emil Fihlman <emil.fihlman@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-01-10 13:38:42 +13:00
Xiao Yang 8eb09b1283 bsd_signal.3: Fix the wrong version of _POSIX_C_SOURCE
According to the latest glibc, the bsd_signal() function is just
declared when POSIX.1-2008 (or newer) instead of POSIX.1-2001 is
not set since glibc v2.26.

Please see the following code from signal/signal.h:
-----------------------------------------------------------------
/* The X/Open definition of `signal' conflicts with the BSD version.
   So they defined another function `bsd_signal'.  */
extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
     __THROW;
-----------------------------------------------------------------

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-01-10 13:38:37 +13:00
Michael Kerrisk 385a5b3dea errno.3: Mention that errno(1) is part of the 'moreutils' package
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-01-10 06:50:25 +13:00
Michael Kerrisk a202ed9396 ioctl_console.2, ctime.3: tfix
Reported-by: Anatoly Borodin <anatoly.borodin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-27 18:28:31 +01:00
Michael Kerrisk 63e59e0d31 system.3: Note that system() can fail for the same reasons as fork(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 08:02:48 +01:00
Michael Kerrisk 0cb0dd1c5d system.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 08:00:34 +01:00
Arkadiusz Drabczyk 80d274454b system.3: Mention that 'errno' is set on error
Corresponding system.3p already mentions that.
Tested with glibc and musl.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 07:59:58 +01:00
Michael Kerrisk 1605ddac8f getaddrinfo.3: Fix off-by-one error in example client program
Reported-by: Eric Sanchis <eric.sanchis@iut-rodez.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-17 08:11:07 +01:00
Michael Kerrisk da3ed81b42 pthread_rwlockattr_setkind_np.3: tfix
Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-17 07:41:18 +01:00
Carlos O'Donell 0d255e74c0 pthread_rwlockattr_setkind_np.3: Remove bug notes
The notes in pthread_rwlockattr_setkind_np.3 imply there is a bug
in glibc's implementation of PTHREAD_RWLOCK_PREFER_WRITER_NP (a
non-portable constant anyway), but this is not true. The
implementation of PTHREAD_RWLOCK_PREFER_WRITER_NP is made almost
impossible by the POSIX standard requirement that reader locks be
allowed to be recursive, and that requirement makes writer
preference deadlock without an impossibly complex requirement that
we track all reader locks. Therefore the only sensible solution
was to add PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP and
disallow recursive reader locks if you want writer preference.

This patch removes the bug description and documents the current
state and recommendations for glibc. I have also updated bug 7057
with this information, answering Steven Munroe's almost 10 year
old question :-) I hope Steven is enjoying his much earned
retirement.

Should we move the glibc discussion to some footnote? Some libc
may be able to implement the requirement to avoid deadlocks in the
future, but I doubt it (fundamental CS stuff).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-17 07:35:53 +01:00
Mike Rapoport a2463bae6f ioctl_userfaultfd.2, madvise.2, memfd_create.2, migrate_pages.2, mmap.2, shmget.2, subpage_prot.2, userfaultfd.2, malloc.3, proc.5, sysfs.5, tmpfs.5: Update paths for in-kernel memory management documentation files
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-17 07:29:53 +01:00
Michael Kerrisk 35f2e598f0 system.3: Use '(char *) NULL' rather than '(char *) 0'
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-10 07:15:40 +01:00
Michael Kerrisk 4f5bbd6115 system.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-09 23:17:15 +01:00
Michael Kerrisk f80fdeaf61 system.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-09 23:14:27 +01:00
Michael Becker dfe50d30d8 resolver.3: Add documentation of res_nclose()
I found the neccessary information in the glibc sources.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-09 08:47:33 +01:00
Keith Thompson 3244025362 strfry.3: Remove incorrect reference to rand(3)
The strfry(3) function does not use rand(). The original version
from 1995 did, but it was changed to use a different PRNG in glibc
commit 4770745624b7f7f25623f1f10d46a4c4d6aec25c, 1996-12-04.

This C program demonstrates the behavior. By not calling srand(),
it gets the same values for successive calls to rand(), but
strfry() returns a different value each time the program is run.
If strfry() called srand(), it would alter the sequence of numbers
return by rand().

int main(void) {
    printf("%d\n", rand());
    char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
    puts(strfry(alphabet));
    printf("%d\n", rand());
}

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-09 04:55:55 +01:00
Elliot Hughes 7c2c86efb7 getmntent.3: Clarify that endmntent() should be used rather than fclose()
This doesn't actually matter on any C library I know of --- they
all just do a NULL check and forward to fclose(3). (The actual
mistake I saw was someone not realizing that they had to call
*anything*.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 16:52:40 +01:00
Elliot Hughes c36a6bedf6 ferror.3: Warn about closing the result of fileno()
Since adding checking to Android's bionic for file descriptor
double-closes, we've found that the most common cause of these
bugs is incorrect use of fileno(3). There appears to be a common
misconception that it transfers ownership of the file descriptor
to the caller.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 16:50:52 +01:00
Ian Turner 9e8d7a8925 lockf.3: ERRORS: add EINTR
Ian Turner: The exact return calls are at the discretion of the
underlying VFS, but I'm pretty sure that EINTR is a possibility.
Or, if it's not, then the flock() manpage should be amended
accordingly, since the two share the same underlying
implementation.

mtk: lockf(3) is implemented on top of fcntl() locking, so
EINTR is of course a possibility.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-02 07:47:39 +01:00
Jakub Wilk 3e9b499229 remainder.3: tfix
Remove stray words.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-27 08:57:37 +02:00
Jakub Wilk 85200b3683 pthread_rwlockattr_setkind_np.3: spfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-21 19:57:31 +02:00
Jakub Wilk 3ceb0d188b pthread_setname_np.3: Explain _np suffix
Add text to CONFORMING TO explaining that the "_np"
suffix is because these functions are non-portable.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-21 19:57:00 +02:00
Michael Kerrisk 49d83458f3 alloca.3: Prevent any misunderstanding about when allocated memory is released
Perhaps some people might misunderstand memory allocated by
alloca() to be like other memory allocated on the stack: that when
the allocation (or the pointer to the allocation) goes out of
scope, the memory is freed. Add some text to prevent that
misunderstanding.

Reported-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-14 14:37:22 +02:00
Michael Kerrisk 38a6fda1e6 atoi.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-14 12:21:28 +02:00
Michael Kerrisk 24467b3f80 getlogin.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-14 12:20:58 +02:00
Michael Kerrisk 2ca6d53467 ttyslot.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-10-14 12:20:33 +02:00
Jason A. Donenfeld 5fcb9ef9cb xcrypt.3: Warn folks not to use these functions
There is not an acceptable reason to use these functions ever in
new code.  For example, just observe the implementation of the
KDF:

	/*
	 * Turn password into DES key
	 */
	void
	passwd2des_internal (char *pw, char *key)
	{
	  int i;

	  memset (key, 0, 8);
	  for (i = 0; *pw && i < 8; ++i)
	    key[i] ^= *pw++ << 1;

	  des_setparity (key);
	}

This kind of nonsense isn't okay in the year 2017. Therefore, we
enlighten our poor users.

[Note from mtk: I think Jason knows that of which he talks.]

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-29 00:02:44 +02:00
Michael Kerrisk d8d7010037 malloc.3: Since glibc 2.29, realloc() is exposed by defining _DEFAULT_SOURCE
Info gleaned from glilic NEWS file.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-14 09:51:30 +02:00
Elliott Hughes 06e9098ede fnmatch.3: Clarify "shell wildcard pattern"
There's a detailed explanation in glob(7), so reuse the same text
glob(3) uses to redirect the reader, rather than inlining a short
explanation.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-05 08:43:11 +02:00
Michael Kerrisk 99a541856a malloc.3: Add reference to glibc MallocInternals wiki
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-01 08:11:52 +02:00
Michael Kerrisk 30a264ba19 trunc.3: Make the description a little clearer
The double negative is a little confusing, but required. But try
to make the semantics a little clearer in the wording (which is
now closer to the wording in the C standard).

Reported-by: Eric Benton <erbenton@comcast.net>
Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 10:43:45 +02:00
Michael Kerrisk 35646edbad trunc.3: Emphasize that the return value is a floating-point number
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 10:35:13 +02:00
Michael Kerrisk a12b305997 strcpy.3: Use "destination" consistently (instead of "target" sometimes)
Reported-by: Frank Theile <ftheile@grundfos.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 14:45:20 +02:00
Michael Kerrisk cf21daa8f4 strcmp.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 12:41:19 +02:00
Heinrich Schuchardt 7e1a3cfb16 strcmp.3: Clarify that strcmp() is not locale aware
Indicate that strcmp() does not take the locale into account.
Provide a link to strcoll().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 12:40:25 +02:00
Michael Kerrisk 51d8bd5745 string.3, strlen.3, strnlen.3: Use 'bytes' not 'characters'
This is inline with POSIX terminology. See also the earlier
commit a00b7454b8 (in 2012)
which fixed most of these cases.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 11:30:53 +02:00
Michael Kerrisk 04ad932426 pthread_attr_init.3: Use correct printf() specifier for "size_t" in example program
Reported-by: Göran Häggsjö <goran.haggsjo@icloud.com>
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 16:13:40 +02:00
Antonio Ospite ff2882fda9 uselocale.3: tfix
LC_GLOBAL_HANDLE is not defined anywhere, the doc meant LC_GLOBAL_LOCALE
instead.

Reported-by: Solal Pirelli <solal.pirelli@gmail.com>
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 16:07:43 +02:00
Michael Kerrisk 937a218ce5 getmntent.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:53:03 +02:00
Michael Kerrisk 1fa5de13d4 getutent.3: tfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:38:08 +02:00
Michael Kerrisk 66af361c68 getopt.3: ffix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:35:22 +02:00
Michael Kerrisk d91b7522a2 cmsg.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-25 10:27:41 +02:00
Michael Kerrisk e5604914d7 cmsg.3: Remove unnecessary 'fdptr' intermediate variable in example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-17 12:26:29 +02:00
Michael Kerrisk ca596a72e1 dlinfo.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-12 14:44:19 +02:00
Michael Kerrisk f565c3ee3e cmsg.3: Note that CMSG_FIRSTHDR can return NULL
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-10 07:14:50 +02:00
Michael Kerrisk f8d958aa3d cmsg.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-10 07:14:50 +02:00
Michael Kerrisk cc94a55964 cmsg.3: Remove out of place mention of MSG_CTRUNC
This detail is covered in recvmsg(2), and now also in unix(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-10 07:14:50 +02:00
Michael Kerrisk ca16e00db8 cmsg.3: Explain zero-initialization requirement for CMSG_NXTHDR()
When initializing a new buffer (e.g., that will be sent with
sendmsg(2)), that buffer must first be zero-initialized to
ensure the correct operation of CMSG_NXTHDR().

Verified by experiment, and also by inspection of the glibc
source code:

  _EXTERN_INLINE struct cmsghdr *
  __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
  {
    if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
      /* The kernel header does this so there may be a reason.  */
      return (struct cmsghdr *) 0;

[1] __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
                                   + CMSG_ALIGN (__cmsg->cmsg_len));
    if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
                                          + __mhdr->msg_controllen)
[2]     || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)  // <---
            > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
      /* No more entries.  */
      return (struct cmsghdr *) 0;
    return __cmsg;
  }

At point [1], __cmsg has been updated to point to the next
cmsghdr. The subsequent check at [2] relies on 'cmsg_len'
in the next cmsghdr having some "sensible" value (e.g., 0).
See also https://stackoverflow.com/questions/27601849/cmsg-nxthdr-returns-null-even-though-there-are-more-cmsghdr-objects

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-10 07:14:50 +02:00
Michael Kerrisk e78f6e739b cmsg.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-06 15:33:17 +02:00
Michael Kerrisk b7b0f18926 malloc.3: Note that calloc() detects overflow when multiplying its arguments
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-04 10:03:01 +02:00
Michael Kerrisk d4f4d3f63f reallocarray.3: New link to malloc(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-04 09:46:06 +02:00
Michael Kerrisk 737002259f putenv.3: Note a glibc extension: putenv("NAME") removes an environment variable
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-27 09:53:55 +02:00
Michael Kerrisk 590ba7e5d0 open_by_handle_at.2, ctermid.3, getcwd.3, proc.5: Wording fix: prefer "pathname" over "path" 2018-06-26 06:47:26 +02:00
Michael Kerrisk 4b18e69ccb getcwd.3: Add details on the getcwd() syscall and how it used by libc functions
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-26 06:47:26 +02:00
Michael Kerrisk 12e5ca8bea getcwd.3: Rework text on use of getcwd() system call
Make it cleared that all of the library functions
described on this page will use the getcwd() system call
if it is present. (The text previously implied that only
the getcwd() library function made use of the system call,
but looking in the glibc source code shows that all of the
functions make use of a generic implementation (__getcwd())
that uses the system call if it is present.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-26 06:12:38 +02:00
Michael Kerrisk 27681259e9 getcwd.3: Reorder the text describing "(unreachable)" being returned by getcwd()
The existing text on some of the oddities of the Linux getcwd()
implementation was placed somewhat obtrusively in the DESCRIPTION.
Shift the text to NOTES, and at the same time move the related
discussion of glibc nonconformance to POSIX into BUGS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-26 06:05:55 +02:00
Lucas Werkmeister 28131cd994 usleep.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-21 19:18:12 +02:00
Matthew Kilgore 85bbb2a253 strcpy.3: Fix example code for strncpy, which could pass an incorrect length
The example code currently passes `buflen - 1` to `strncpy`,
however the length parameter to `strncpy` is `size_t`, which is
unsigned.  This means that when `buflen` is zero, the cast of `-1`
to unsigned will result in passing `UINT_MAX` as the length.
Obviously, that would be incorrect and could cause `strncpy` to
write well beyond the buffer passed.

The easy solution is to wrap the whole code in the `buflen > 0`
check, rather then just the part of the code that applies the null
terminator.

Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-10 13:36:46 +02:00
Mike Frysinger 946bdf7207 exit.3: Note wider sysexits.h availability
Since the BSD header has been imported to other C libraries (including
glibc), note that here so people know it isn't BSD-specific.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-31 21:34:32 +02:00
Michael Kerrisk 65c3312c6d putenv.3: wfix
Reported-by: James Weigle <jtweigle@uchicago.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 10:58:45 +02:00
Michael Kerrisk ff2c46188e termios.3: Minor tweaks to Eugene's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 12:46:09 +02:00
Eugene Syromyatnikov 499eb81f26 termios.3: Note an XTABS alpha issue
* man3/termios.3 (.B TABDLY): Reference to the BUGS section.
(.SH BUGS): New section.  Describe an issue on alpha where the XTABS
macro was defined to a value outside TABDLY mask.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 12:40:49 +02:00
Michael Kerrisk a706f0e022 Removed trailing white space at end of lines 2018-04-30 17:54:16 +02:00
Michael Kerrisk 09b8afdc04 execve.2, fallocate.2, getrlimit.2, io_submit.2, membarrier.2, mmap.2, msgget.2, open.2, ptrace.2, readv.2, semget.2, shmget.2, shutdown.2, syscall.2, wait.2, wait4.2, crypt.3, encrypt.3, fseek.3, getcwd.3, makedev.3, pthread_create.3, puts.3, tsearch.3, elf.5, filesystems.5, group.5, passwd.5, sysfs.5, mount_namespaces.7, posixoptions.7, time.7, unix.7, vdso.7, xattr.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-30 17:41:31 +02:00
Michael Kerrisk ebd10b39cb keyctl.2, sincos.3: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk 29c0586f51 bpf.2, sched_setattr.2, crypt.3, elf.5, proc.5, fanotify.7, feature_test_macros.7, sched.7: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk d2cb1ef1ac fallocate.2, keyctl.2, bzero.3: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk f019faae04 fseek.3: Improve EPIPE error text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-19 15:00:04 +02:00
Michael Kerrisk f2e2bdc0eb fseek.3: ERRORS: EBADF should be ESPIPE
Reported-by: Andy Owen <andrew.owen@dolby.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-19 14:57:17 +02:00
Michael Kerrisk 924f766741 encrypt.3: Replace text that is duplicated in crypt(3) with a cross reference
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 21:23:28 +02:00
Michael Kerrisk 3f3eeb9ca0 crypt.3: tfix
Reported-by: Nikos Mavrogiannopoulos <nmavrogi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 21:23:28 +02:00
Michael Kerrisk 8291a17bd6 crypt.3: Tweaks to Carlos O'Donell's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 21:07:22 +02:00
Michael Kerrisk b2ca119e1a encrypt.3: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 17:02:28 +02:00
Michael Kerrisk 419b9d89e6 crypt.3: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 17:02:28 +02:00
Carlos O'Donell 629a86ecb7 crypt.3, encrypt.3: Add notes about _XOPEN_CRYPT
The distribution may choose not to support _XOPEN_CRYPT in the
case that the distribution has transitioned from glibc crypt to
libxcrypt.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 17:02:28 +02:00
Michael Kerrisk 40b7acf14d getcwd.3: Minor tweaks to Carlos O'Donell's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:49:40 +02:00
Michael Kerrisk c26d16c8de getcwd.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:47:03 +02:00
Carlos O'Donell 294851f3fa getcwd.3: Mention that "(unreachable)" is no longer returned for glibc >= 2.27.
With glibc fix 52a713fdd0a30e1bd79818e2e3c4ab44ddca1a94 for
CVE-2018-1000001 (Sourceware BZ #22679) the implementation in the
just released glibc 2.27 has been changed such that instead of
returning "(unreachable)" the implementation now returns ENOENT
as it would have if the current directory had been unlinked.

I see that in 2015 the quirk was documented in commit
a2ac97c78b, and this is no longer
true with glibc 2.27, but may continue to be true in other C libraries,
so I reference NOTES from the paragraph in the central text.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:44:51 +02:00
Michael Kerrisk 169d728330 pthread_create.3: Minor fix: reorder table items
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-05 20:12:18 +02:00
Michael Kerrisk 8efada9938 pthread_create.3: Minor tweaks to Frederic Brault's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-05 20:12:18 +02:00
Frederic Brault af6e958b58 pthread_create.3: Note default thread stack size for several architectures
I am trying to fix a FIXME in the pthread_create.3 manpage.
It says info about default thread stack size should be put in
pthread_attr_setstacksize.3.

And pthread_attr_setstacksize.3 says "For details on the default
stack size of new threads, see pthread_create(3)".

So I list the default values for several architectures, starting
from glibc 2.12 (and still valid on current git glibc).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-05 20:12:07 +02:00
Jann Horn f23ba9ce98 tsearch.3: tdelete() can return dangling pointers
POSIX says that deleting the root node must cause tdelete() to
return some unspecified non-NULL pointer. Glibc implements it by
returning a dangling pointer to the (freed) root node:

$ cat bogus_tdelete.c

static void *root = NULL;

static void *xmalloc(unsigned n) {
    void *p;
    p = malloc(n);
    if (!p)
        err(1, "malloc");
    return p;
}

static int compare(const void *pa, const void *pb) {
    if (*(int *) pa < *(int *) pb)
        return -1;
    if (*(int *) pa > *(int *) pb)
        return 1;
    return 0;
}

int main(void) {
    int *ptr;
    void *val, *parent;

    ptr = xmalloc(sizeof(int));
    *ptr = 1234;
    val = tsearch((void*)ptr, &root, compare);
    assert(*(int**)val == ptr);
    printf("root: %p\n", root);

    parent = tdelete((void*)ptr, &root, compare);
    printf("tdelete return value: %p; new root: %p\n", parent, root);

    return 0;
}
$ gcc -o bogus_tdelete bogus_tdelete.c -std=gnu99 -Wall
$ gdb ./bogus_tdelete
GNU gdb (GDB) 7.9-gg19
[...]
(gdb) break free
Function "free" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (free) pending.
(gdb) run
Starting program: /usr/local/google/home/jannh/tmp/bogus_tdelete
[...]
root: 0x555555756030

Breakpoint 1, 0x00007ffff7ab54e0 in free () from [...]
(gdb) print (void*)$rdi
$1 = (void *) 0x555555756030
(gdb) cont
Continuing.
tdelete return value: 0x555555756030; new root: (nil)
[Inferior 1 (process 56564) exited normally]
(gdb) quit

Therefore, explicitly note that tdelete() may return bad pointers
that must not be accessed.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-27 22:29:10 +02:00
Jann Horn f119ba87ea tsearch.3: Clarify items vs nodes
The manpage claimed that tsearch() returns a pointer to a data
item. This is incorrect; tsearch() returns a pointer to the
corresponding tree node, which can also be interpreted as a
pointer to a pointer to the data item.

Since this API is quite unintuitive, also add a clarifying
sentence.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-27 22:25:29 +02:00
Michael Kerrisk 517b7ac44a makedev.3: Since glibc 2.28, <sys/types.h> no longer defines these macroa
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-19 18:39:15 +01:00
Michael Kerrisk 0512f57cea atexit.3: wfix
Reported-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-09 07:00:17 +01:00
Mike Frysinger 724127aa2d put(3): fix formatting of trailing period
The period after the function call is incorrectly marked with bold.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-04 07:32:04 +01:00
Michael Kerrisk 8538a62b4c iconv.1, bpf.2, copy_file_range.2, fcntl.2, memfd_create.2, mlock.2, mount.2, mprotect.2, perf_event_open.2, pkey_alloc.2, prctl.2, read.2, recvmmsg.2, s390_sthyi.2, seccomp.2, sendmmsg.2, syscalls.2, unshare.2, write.2, errno.3, fgetpwent.3, fts.3, pthread_rwlockattr_setkind_np.3, fuse.4, veth.4, capabilities.7, cgroups.7, ip.7, man-pages.7, namespaces.7, network_namespaces.7, sched.7, socket.7, user_namespaces.7, iconvconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-02 07:38:54 +01:00
Michael Kerrisk a25748e649 pthread_mutexattr_setrobust.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 23:20:46 +01:00
Michael Kerrisk 41a64b30fc dl_iterate_phdr.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 23:16:04 +01:00
Michael Kerrisk 7de982f8af basename.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 23:15:08 +01:00
Michael Kerrisk 7ebb909a80 getnameinfo.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 23:03:46 +01:00
Michael Kerrisk 0335565faa resolver.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:51:26 +01:00
Michael Kerrisk a2d427c1a6 initgroups.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:50:06 +01:00
Michael Kerrisk 7457600f6e getutent.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:49:28 +01:00
Michael Kerrisk d0b8a8d817 getmntent.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:48:20 +01:00
Michael Kerrisk 0578c69df2 fgetpwent.3: Add missing ATTRIBUTES preamble
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:46:28 +01:00
Michael Kerrisk d2cd45885b errno.3: 'errno -s' can be used to search for errors by string in description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-23 08:43:20 +01:00
Michael Kerrisk 10b6adae8a fts.3: fts_pathlen = strlen(fts_path) + strlen(fts_name)
As noted by Pradeep (and I tested also the code on OpenBSD):

The man page for fts library call states both the following:

     short          fts_pathlen;  /* strlen(fts_path) */

     fts_pathlen The length of the string referenced by fts_path

However, for the structures returned from fts_children() function,
fts_pathlen is strlen(fts_path) + strlen(fts_name), which contradicts
the man page statement. So I believe that there is either a bug in the
man page or the fts_children() library call.

The following program can be used for verification:

int main() {
	struct passwd *pwd_entry = getpwuid(getuid());
	char *paths[] = {pwd_entry->pw_dir, NULL};
	FTS* fts = fts_open(paths, FTS_LOGICAL, NULL);
	FTSENT* ftsent = fts_read(fts);
	FTSENT* child = fts_children(fts, 0);
	while (child != NULL) {
		printf("\n %s %s %d %lu", child->fts_path, child->fts_name,
				child->fts_pathlen, strlen(child->fts_path));
		child = child->fts_link;
	}
	return 0;
}

Reported-by: Pradeep Kumar <pradeepsixer@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 07:24:41 +01:00
Michael Kerrisk 3ca4400d74 usleep.3: Minor wording fix
Reported-by: Eric Benton <erbenton@comcast.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-18 17:19:07 +01:00
Michael Kerrisk 6386c0c862 errno.3: Add Linux error text corresponding to ENOMEM
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-16 00:09:16 +01:00
G. Branden Robinson 777411ae61 iconv.1, pthread_rwlockattr_setkind_np.3, man-pages.7, socket.7, iconvconfig.8: Standardize on "nonzero"
Also add this term to the style guide in man-pages(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-05 22:27:13 +01:00
roblabla 0f24751222 pthread_mutexattr_init.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-05 22:27:06 +01:00
Michael Kerrisk 1c6f59c276 getpid.2, pipe.2, abort.3, daemon.3, pthread_yield.3, stdio.3, sysconf.3, tty.4, shells.5, sysfs.5, fifo.7, hier.7, icmp.7, path_resolution.7, pid_namespaces.7, standards.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-26 12:38:46 +01:00
Michael Kerrisk d2414cb5a1 makedev.3: Minor fixes to Adrian Bunk's patch
Note glibc version where deprecation occurred.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-25 14:23:05 +01:00
Adrian Bunk 1e50980d0f makedev.3: glibc has deprecated exposing the definitions via <sys/types.h>
Compile warning with glibc 2.25:

    warning: In the GNU C Library, "makedev" is defined by
    <sys/sysmacros.h>. For historical compatibility, it is
    currently defined by <sys/types.h> as well, but we plan to
    remove this soon.  To use "makedev", include <sys/sysmacros.h>
    directly. If you did not intend to use a system-defined macro
    "makedev", you should undefine it after including
    <sys/types.h>.

Background: glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-25 14:18:41 +01:00
Michael Kerrisk 7d4151a5c3 errno.3: Remove an unnecessary sentence
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:24:53 +01:00
Michael Kerrisk b01ecc5e1d errno.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 21:24:21 +01:00
Michael Kerrisk 5a99c72245 errno.3: Note the use of perror(3) and strerror(3)
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:49:32 +01:00
Michael Kerrisk afde18c00a errno.3: Minor wording change
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:59 +01:00
Michael Kerrisk f79214781c errno.3: Explicitly note that error numbers vary also across UNIX systems
Reported-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 6eb4b782a0 errno.3: Recast the advice against manually declaring 'errno'
Recast the advice against manually declaring 'errno' to
a more modern perspective. It's 13 years since the original
text was added, and even then it was describing old behavior.
Cast the description to be about behavior further away in
time, and note more clearly that manual declaration will
cause problems with modern C libraries.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 5db92f96f4 errno.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 44a35dc807 errno.3: Note use of errno(1) to look up error names and numbers
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk bf3683a153 errno.3: Note that error numbers vary somewhat across architectures
Added after a patch from Wesley Aptekar-Cassels that proposed
to add error numbers to the text.

Reported-by: Wesley Aptekar-Cassels <w.aptekar@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk 9d1a5fa63e errno.3: Error numbers are positive values (rather than nonzero values)
POSIX.1-2008 noted the explicitly the change (to align with
the C standards) that error numbers are positive, rather
than nonzero.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk b89ec85240 errno.3: Reorganize the text and and some subheadings
Restructure the text and add some subheadings for better
readability. No (intentional) content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:39:01 +01:00
Michael Kerrisk c288d6b50d errno.3: Note the <errno.h> also provides the symbolic error names
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk a9641f84a1 errno.3: Minor text reorganization
No content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk e4a5b66224 errno.3: Minor rewording/reformatting
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk 5a63455fb3 errno.3: Update error list for POSIX.1-2008
POSIX.1-2008 specified a couple of new errors not present in
POSIX.1-2001.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk c106a226b3 errno.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk 975c0f87a2 errno.3: Add some missing errors
Based on comparing the filtered content of the two main
kernel errno files:

    cat include/uapi/asm-generic/errno.h \
        include/uapi/asm-generic/errno-base.h | grep define | \
        grep -v 'define _' | awk '{print $2}' | sort -u

to see what is absent from this page, and used in either kernel
or glibc.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-23 10:10:12 +01:00
Michael Kerrisk 7a951861cb exec.3: glibc 2.24 dropped CWD from the defaul path
Document the glibc 2.24 change that dropped CWD from the default
search path employed by execlp(), execvp() and execvpe() when
PATH is not defined.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 20:31:12 +01:00
Michael Kerrisk fefbc57db0 popen.3: Add a cross reference to Caveats in system(3)
All of the same risks regarding system() also apply to popen().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:17:10 +01:00
Michael Kerrisk 2e039d4db5 system.3: Mention file capabilities in discussion of privileged programs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:15:10 +01:00
Michael Kerrisk 067f80642b system.3: Note that user input for system() should be carefully sanitized
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:15:10 +01:00
Michael Kerrisk 1f87e63922 system.3: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:03:09 +01:00
Michael Kerrisk a1a1c8ce19 system.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:02:14 +01:00
Michael Kerrisk 3b9f2b67e7 system.3: Mention PATH explicitly in discussion of system and set-UID programs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:00:56 +01:00
Michael Kerrisk bd64aa6435 system.3: Correctly note which shell Debian uses as (noninteractive) /bin/sh
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 15:00:56 +01:00
Michael Kerrisk a6be81bab9 system.3: Create a "Caveats" subsection to hold warnings about the use of system()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-20 14:54:00 +01:00
Seonghun Lim 0fd299bf6c strverscmp.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:34:05 +01:00
Seonghun Lim d42ffdf8e3 sockatmark.3: Fix cruft in code example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:33:26 +01:00
Seonghun Lim 35ed4d7ea0 random_r.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:30:29 +01:00
Seonghun Lim 6da3279c45 stdio.3: wsfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:28:08 +01:00
Seonghun Lim 6968bea38c stdin.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:27:07 +01:00
Seonghun Lim be4c9c66c1 atexit.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-09 09:26:36 +01:00
Lucas Werkmeister e4631a3524 system.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-07 23:14:27 +01:00
Michael Kerrisk 247bbcf00c ffs.3: glibc 2.27 relaxes the FTM requriements for ffsl() nand ffsll()
glibc 2.27 relaxes the FTM requriements for ffsl() and
ffsll() to _DEFAULT_SOURCE.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-11-02 08:20:26 +01:00
Michael Kerrisk 5f70d096ae stdio.3: Remove crufty reference to pc(1)
I'm not sure what compiler is referred to by "pc(1)",
but "dnf whatprovides" and web searches turn up no
mention of a compiler by that name.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-29 13:23:55 +01:00
Michael Kerrisk 3242546c6e stdio.3: Use proper section cross references in function list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-29 13:23:55 +01:00
G. Branden Robinson 9ab7f611ed Replace Latin abbreviation "cf.".
People seem to be using "cf." ("confere"), which means "compare",
to mean "see" instead, for which the Latin abbreviation would be
"q.v." ("quod vide" -> "which see").

In some cases "cf." might actually be the correct term but it's
still not clear what specific aspects of a function/system call
one is supposed to be comparing.

I left one use in place in hope of obtaining clarification,
because it looks like it might be useful there, if contextualized.

Migrate these uses to English and add them to the list of
abbreviations to be avoided.

If the patch to vfork(2) is not accepted, then the cf. still needs
an \& after it because it is at the end of the line but not the
end of a sentence.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-27 17:39:33 +02:00
G. Branden Robinson 9b13f7700e connect.2, ioprio_set.2, dbopen.3, group.5, fifo.7: tfix
Fix nonstandard usage.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-23 06:41:59 +02:00
Michael Kerrisk 84fe93c843 infnan.3: Remove page
This function was in libc4 and libc5, but never part
of glibc. It ceased to be relevant nearly 20 years
ago. Time to remove the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-22 08:04:30 +02:00
G. Branden Robinson 59524c5eb3 pthread_spin_init(3): tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-22 07:50:53 +02:00
Michael Kerrisk 26cd31fd4a access.2, delete_module.2, eventfd.2, fallocate.2, fcntl.2, getrandom.2, init_module.2, open.2, seccomp.2, timerfd_create.2, openpty.3, pthread_spin_lock.3, shm_open.3, tempnam.3, fifo.7, keyrings.7, pid_namespaces.7, sched.7, thread-keyring.7: wfix (will fail --> fail/fails)
Reported-by: Pedro Alves <palves@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 16:55:10 +02:00
Michael Kerrisk a23d8efafc capget.2, fanotify_init.2, fcntl.2, ioctl_tty.2, madvise.2, mbind.2, prctl.2, sched_setaffinity.2, hash.3, isgreater.3, posix_fallocate.3, sigvec.3, full.4, sd.4, wavelan.4, core.5, host.conf.5, epoll.7, signal.7, unix.7, user_namespaces.7: wfix (will fail --> fail/fails)
Reported-by: Pedro Alves <palves@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 16:36:57 +02:00
Michael Kerrisk b858495171 pthread_spin_init.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:49 +02:00
Michael Kerrisk 5017fc28ec pthread_spin_init.3: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:49 +02:00
Michael Kerrisk 28c15b63d6 pthread_spin_init.3: Add more caveats on use of spin locks
Cowritten-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:49 +02:00
Michael Kerrisk 34d46b816e pthread_spin_init.3: Strengthen note about when spin locks should (not) be used
Reported-by: Zack Weinberg <zackw@panix.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:49 +02:00
Michael Kerrisk 0e905edca8 pthread_spin_init.3: Operations on copies of *lock yield undefined behavior
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk eb93621d10 pthread_spin_init.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk af79528ece pthread_spin_lock.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 4eea22f5ae pthread_spin_lock.3: wfix
Reported-by: Zack Weinberg <zackw@panix.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 07fa47a568 pthread_spin_lock.3: Fixes suggested by Carlos O'Donell
Reported-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk f3861c72a9 pthread_spin_lock.3: Refer reader to important details in NOTES in pthread_spin_init(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 8cbd1d9e4d pthread_spin_init.3: Warn about deadlock with spin locks
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 2dea72418d pthread_spin_init.3: Spin locks should be used with real-time scheduling policies
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 41041696d3 pthread_yield.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 77e0fbc201 pthread_spin_trylock.3, pthread_spin_unlock.3: New links to new pthread_spin_lock3 page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk ce42a8cf5f pthread_spin_lock.3: New page describing functions that lock and unlock spin locks
Add a page descrbing pthread_spin_lock(3), pthread_spin_unlock(3),
and pthread_spin_trylock(3).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 14bffcef9c pthread_spin_destroy.3: New link to new pthread_spin_init.3 page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk 7f5f8925ce pthread_spin_init.3: New page describing pthread_spin_init(3) and pthread_spin_destroy(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 10:20:48 +02:00
Michael Kerrisk cddd55a004 pthread_yield.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 09:58:54 +02:00
Michael Kerrisk d304c13dac posix_fallocate.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 09:26:12 +02:00
Michael Kerrisk 9ea5bc667b clone.2, getcpu.2, shmget.2, syscall.2, dladdr.3, proc.5, vdso.7: Consistently use "x86-64", not "x86_64"
When referring to the architecture, consistently use "x86-64",
not "x86_64". Hitherto, there was a mixture of usages, with
"x86-64" predominant.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 09:26:12 +02:00
Michael Kerrisk 98f24fc65c abort.3: SEE ALSO: add assert(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-08 16:19:58 +02:00
Michael Kerrisk 46dc471b8d abort.3: Starting with glibc 2.27, abort() does not attempt to flush streams
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-08 16:19:47 +02:00
Fangrui Song 8a3f19c369 pow10.3: tfix
Signed-off-by: Fangrui Song <i@maskray.me>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-08 10:52:25 +02:00
Jakub Wilk e40be343f7 mallinfo.3: Fix the example
Remove reference to non-standard "tlpi_hdr.h" and replace calls to
functions that were declared in this header.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-05 20:34:40 +02:00
Michael Kerrisk 2050975ecc setlocale.3: The standards do not specify all of the locale categories
Reported-by: Křištof Želechovski <giecrilj@stegny.2a.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-03 15:23:37 +02:00
Michael Kerrisk 46f2cf80f4 pthread_yield.3: pthread_yield() is intended for use with real-time scheduling policies
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-29 22:46:28 +02:00
Michael Kerrisk 454f90d7b7 backtrace.3: Minor tweaks to Stefan Puiu's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-29 20:36:55 +02:00
Stefan Puiu ca5d5169cb backtrace_symbols_fd() can trigger a call to malloc()
Currently, the backtrace(3) manual page says this about backtrace_symbols_fd():

back‐
       trace_symbols_fd() does not call malloc(3), and so can be
employed in situations where the latter function might fail.

However, I watched a video of a presentation about signal handling and
the speaker was saying that calling backtrace() can trigger a call to
malloc - indirectly. That happens because the backtrace*() functions
are part of libgcc, which gets dynamically loaded whenever needed;
dynamic loading would, in turn, trigger a malloc. The talk can be
found here: http://free-electrons.com/pub/video/2008/ols/ols2008-gilad-ben-yossef-fault-handlers.ogg

I decided to test it out, and it seems that this is still true (at
least on Ubuntu 12.04). I compiled the attached program (I used
CXXFLAGS = '-Wall -g -std=c++0x', the -std= part is not really needed)
and ran it through gdb, putting a breakpoint on the line where
backtrace is called. When that breakpoint is hit, I set a breakpoint
on malloc, continued and voila:

Breakpoint 2, __GI___libc_malloc (bytes=36) at malloc.c:2910
2910    malloc.c: No such file or directory.
(gdb) bt
"/lib/x86_64-linux-gnu/libgcc_s.so.1") at dl-load.c:162
"libgcc_s.so.1", type=2, trace_mode=0, mode=-1879048191,
nsid=<optimized out>) at dl-load.c:2473
errstring=0x7fffffffdd00, mallocedp=0x7fffffffdd0f,
operate=0x7ffff7ded700 <dl_open_worker>, args=0x7fffffffdcb0) at
dl-error.c:178
"libgcc_s.so.1", mode=-2147483647, caller_dlopen=0x7ffff7b260a9,
nsid=-2, argc=1, argv=<optimized out>, env=0x7fffffffe068) at
dl-open.c:639
errstring=0x7fffffffded0, mallocedp=0x7fffffffdeef,
operate=0x7ffff7b4bc20 <do_dlopen>, args=0x7fffffffdeb0) at
dl-error.c:178
operate=0x7ffff7b4bc20 <do_dlopen>) at dl-libc.c:48
out>) at dl-libc.c:165
../sysdeps/x86_64/../ia64/backtrace.c:104

Reviewed-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-29 20:32:23 +02:00
Michael Kerrisk 76f23c9448 pthread_detach.3: Improve sentence describing freeing of resources on process termination
As reported by Rahul, the existing sentence could be read as
meaning that resources of joined and terminated detached
threads are freed at only at process termination. Eliminate
that possible misreading.

Reported-by: Rahul Bedarkar <rpal143@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-29 18:24:22 +02:00
Mike Frysinger 3144b41214 perror.3: tfix: add missing period
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-28 17:21:12 +02:00
Michael Kerrisk f6cf8f80bc lround.3: Minor tweaks to .TH line
A further follow-up to
https://bugzilla.kernel.org/show_bug.cgi?id=194601

Reported-by: David Eckardt <david.eckardt@sociomantic.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-28 08:56:18 +02:00
Michael Kerrisk 940bdd7ece daemon.3: SEE ALSO: add daemon(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-25 13:06:24 +02:00
Michael Kerrisk f620444aea malloc.3: SEE ALSO: add valgrind(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-25 12:14:07 +02:00
Michael Kerrisk 8f7a89b0fb daemon.3: SEE ALSO: add logrotate(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-25 12:05:09 +02:00
Michael Kerrisk 39a6b7e8fb sysconf.3: Mention get_nprocs_conf(3)
Mention get_nprocs_conf(3) in discussion of _SC_NPROCESSORS_CONF
and _SC_NPROCESSORS_ONLN.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-25 11:53:51 +02:00
Michael Kerrisk c9cfbbe945 get_nprocs_conf.3: SEE ALSO: add nproc(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-25 11:53:16 +02:00
Michael Kerrisk a448a0c6c3 get_nprocs_conf.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-25 11:51:26 +02:00
Michael Kerrisk ce08dedca4 lround.3: Clarify that lround() rounds *halfway cases" away from zero
See https://bugzilla.kernel.org/show_bug.cgi?id=194601

Reported-by: David Eckardt <david.eckardt@sociomantic.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-24 09:53:49 +02:00
Julien Gomes 13e69b6c6a openpty.3: tfix
Signed-off-by: Julien Gomes <julien@arista.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-22 10:04:56 +02:00
Michael Kerrisk c551100943 fexecve.3: Add some detail on the glibc implementation of fexecve() via execveat(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-22 08:44:18 +02:00
Michael Kerrisk 136badedfd fexecve.3: Minor tweaks to Cristian's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-22 08:44:18 +02:00
Cristian Rodríguez b71753c1fc fexecve.3: fexecve() is now implemented with execveat(2), where available
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-22 08:44:18 +02:00
Michael Kerrisk 046a128700 fexecve.3: O_PATH file descriptors are also usable with fexecve()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-16 15:38:21 +02:00
Michael Kerrisk 4b8c67d976 iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, pldd.1, sprof.1, time.1, _syscall.2, add_key.2, alloc_hugepages.2, arch_prctl.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, fanotify_init.2, fcntl.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_console.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_getfsmap.2, ioctl_iflags.2, ioctl_list.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscall.2, syscalls.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, ustat.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, __ppc_get_timebase.3, __ppc_set_ppr_med.3, __ppc_yield.3, __setfpucw.3, acos.3, acosh.3, adjtime.3, aio_fsync.3, aio_init.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, backtrace.3, basename.3, bindresvport.3, bsd_signal.3, bsearch.3, bswap.3, btree.3, byteorder.3, bzero.3, canonicalize_file_name.3, carg.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cexp.3, cfree.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, cmsg.3, confstr.3, copysign.3, cos.3, cosh.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctime.3, dbopen.3, dl_iterate_phdr.3, dladdr.3, dlerror.3, dlinfo.3, dlopen.3, dlsym.3, drand48.3, drand48_r.3, duplocale.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetc.3, fgetgrent.3, fgetpwent.3, finite.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fopen.3, fopencookie.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, frexp.3, fseek.3, fseeko.3, ftime.3, fts.3, ftw.3, futimes.3, gamma.3, gcvt.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getentropy.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getsubopt.3, getttyent.3, getumask.3, getutent.3, getwchar.3, glob.3, gnu_get_libc_version.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, if_nameindex.3, if_nametoindex.3, ilogb.3, inet.3, inet_net_pton.3, inet_ntop.3, inet_pton.3, initgroups.3, insque.3, intro.3, isalpha.3, isgreater.3, j0.3, key_setsecret.3, killpg.3, ldexp.3, lgamma.3, lio_listio.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, mkfifo.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mtrace.3, newlocale.3, nextafter.3, nextup.3, nl_langinfo.3, ntp_gettime.3, offsetof.3, on_exit.3, open_memstream.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_atfork.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_exit.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, ptsname.3, putgrent.3, putpwent.3, qsort.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, scalb.3, scalbln.3, scandir.3, scanf.3, sched_getcpu.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, strcasecmp.3, strcat.3, strchr.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfromd.3, strftime.3, strptime.3, strsignal.3, strstr.3, strtod.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, telldir.3, tempnam.3, termios.3, tgamma.3, timeradd.3, tmpnam.3, toupper.3, towlower.3, towupper.3, trunc.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, undocumented.3, unlocked_stdio.3, updwtmp.3, uselocale.3, usleep.3, wcrtomb.3, wcsdup.3, wcsnrtombs.3, wcsrtombs.3, wcstombs.3, wctob.3, wcwidth.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console_codes.4, dsp56k.4, fuse.4, hd.4, hpsa.4, initrd.4, intro.4, loop.4, random.4, rtc.4, sd.4, sk98lin.4, st.4, wavelan.4, acct.5, core.5, elf.5, filesystems.5, host.conf.5, hosts.5, locale.5, nologin.5, proc.5, resolv.conf.5, rpc.5, slabinfo.5, utmp.5, aio.7, arp.7, bootparam.7, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, cpuset.7, ddp.7, environ.7, epoll.7, fanotify.7, feature_test_macros.7, futex.7, inode.7, inotify.7, ip.7, ipv6.7, keyrings.7, locale.7, man-pages.7, man.7, math_error.7, mount_namespaces.7, mq_overview.7, namespaces.7, netdevice.7, netlink.7, packet.7, pipe.7, pkeys.7, pthreads.7, pty.7, raw.7, rtld-audit.7, rtnetlink.7, sched.7, session-keyring.7, signal.7, sock_diag.7, socket.7, spufs.7, suffixes.7, tcp.7, udp.7, udplite.7, unicode.7, units.7, unix.7, uri.7, user_namespaces.7, vdso.7, x25.7, xattr.7, iconvconfig.8, ld.so.8, ldconfig.8, sln.8: Update timestamps
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-15 12:44:56 +02:00
Yubin Ruan 91fd35ad46 pthread_mutexattr_setrobust.3: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-15 09:53:17 +02:00
Michael Kerrisk 336e15b267 malloc.3: Minor fix: reword to ease understanding
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-15 09:33:02 +02:00
Jonas Grabber c87d084b87 getrlimit.2, mmap.2, malloc.3: RLIMIT_DATA affects mmap (2) since Linux 4.7
Starting with Linux kernel 4.5 and 84638335900f1995
(mm: rework virtual memory accounting) RLIMIT_DATA affects
mmap(2).  With d977d56ce5b3e88 (mm: warn about VmData over
RLIMIT_DATA) only warnings are emmitted when going over the
specified RLIMIT_DATA in 4.5.

As of 4.7 and f4fcd55841fc9 (mm: enable RLIMIT_DATA by default
with workaround for valgrind) going over RLIMIT_DATA through
mmap(2) is forbidden.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-15 09:33:02 +02:00
Michael Kerrisk a40d006b5d strptime.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-14 15:47:15 +02:00
Michael Kerrisk 6c22b2c593 strchr.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-14 15:46:44 +02:00
Michael Kerrisk 1a14615c34 pthread_mutexattr_init.3: SEE ALSO: add pthread_mutexattr_getpshared(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk 2fdf4c5f1e pthread_mutexattr_setpshared.3: New link to new pthread_mutexattr_getpshared.3 page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk b967efeb5b pthread_mutexattr_getpshared.3: New page for pthread_mutexattr_getpshared(3) and pthread_mutexattr_setpshared.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk 7cff199dfc pthread_mutexattr_destroy.3: New link to new pthread_mutexattr_init.3 page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk 9d48165364 pthread_mutexattr_init.3: New page for pthread_mutexattr_init(3) and pthread_mutexattr_destroy(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk a126d04055 pthread_mutex_consistent.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk cf5744eb46 pthread_mutex_consistent.3: Point out that the application must make shared data consistent
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:32 +02:00
Michael Kerrisk 2fe9fbf168 pthread_mutex_consistent.3: Clarify that EOWNERDEAD is returned by pthread_mutex_lock()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk a9e45d2423 pthread_mutex_consistent.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk f49ed5cd38 pthread_mutex_consistent.3: Refer to example in pthread_mutexattr_setrobust(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk 77988d6276 pthread_mutex_consistent_np.3: New link to new pthread_mutex_consistent.3 page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk 99fa587d0d pthread_mutex_consistent.3: Mention pthread_mutex_consistent_np()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk 5214dd2066 pthread_mutex_consistent.3: Add VERSIONS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk abdad18584 pthread_mutex_consistent.3: Add feature test macro requirements and CONFORMING TO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk da9fc02934 pthread_mutex_consistent.3: srcfix: rewrap source lines at sentence boundaries
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk fcc827bc2d pthread_mutex_consistent.3: tfix: fix spelling errors and grammar
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk de2fba0e1a pthread_mutex_consistent.3: srcfix: remove blank lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk 700b4034e9 pthread_mutexattr_setrobust.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 16:47:31 +02:00
Michael Kerrisk 8fbf748dd0 pthread_mutexattr_setrobust.3: SEE ALSO: add get_robust_list(2) and set_robust_list(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 5ede40bbc8 pthread_mutexattr_setrobust.3: On Linux execve(2) also causes EOWNERDIED notification
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 143e516fbd pthread_mutexattr_setrobust.3: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 8524bca574 pthread_mutexattr_setrobust.3: EXAMPLE: show example run of program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk f6569f44bd pthread_mutexattr_setrobust.3: Minor rewording in example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk a205ca43a4 pthread_mutexattr_setrobust.3: Various improvements to the example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 5d26c00fc9 pthread_mutexattr_setrobust.3: EXAMPLE: use a more conventional name for the mutex variable
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk d1524d1813 pthread_mutexattr_setrobust.3: Various rewordings and improvements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 99afed9ead pthread_mutexattr_setrobust.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 5514936a31 pthread_mutexattr_setrobust.3: Add VERSIONS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 06ae85bd18 pthread_mutexattr_setrobust.3: Add feature test macro requirements plus CONFORMING TO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 61265f77f7 pthread_mutexattr_setrobust.3: Move the "_np" interfaces to NOTES
Move the old GNU nonportable APIs into notes. Having them
in the main text is a distraction.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 52124b96e4 pthread_mutexattr_setrobust.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 37f0c285e1 pthread_mutexattr_setrobust.3: Fix minor type error in SYNOPSIS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk 4057660b6e pthread_mutexattr_setrobust.3: Minor tweaks to the example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00
Michael Kerrisk ad2825bf83 pthread_mutexattr_setrobust.3: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-09-13 15:45:09 +02:00