Commit Graph

5935 Commits

Author SHA1 Message Date
Michael Kerrisk 02959ce250 select.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-10 21:05:11 +01:00
Michael Kerrisk 4efcd5dd6a sched_setaffinity.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-10 21:05:11 +01:00
Michael Kerrisk 310ac27840 sched_setaffinity.2: Warn that CPU_ALLOC() may allocate a slightly CPU set than requested
Reported-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-10 21:04:55 +01:00
Michael Kerrisk b796767217 sched_setaffinity.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-10 16:02:39 +01:00
Michael Kerrisk 8cd11c4293 execve.2: Add EPERM error for capabilities check of capability-dumb binaries
Reported-by: Krzysztof Adamski <k@japko.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-10 01:30:38 +01:00
Michael Kerrisk bf9c09382b sched_setaffinity.2: Add reference to CPU_ALLOC(3)
Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-09 00:34:41 +01:00
Michael Kerrisk 9764a9ff2a eventfd.2: Note that eventfd info is available in /proc/PID/fdinfo
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-08 19:24:48 +01:00
Michael Kerrisk 13dd2598aa signalfd.2: Note that signalfd info is available in /proc/PID/fdinfo
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-08 19:24:47 +01:00
Michael Kerrisk aaf7a57425 open.2: NOTES: mention existence of proc/PID/fd and /proc/PID/fdinfo
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-08 18:58:34 +01:00
Michael Kerrisk 8bbae7d03c adjtimex.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 19:30:53 +01:00
Michael Kerrisk ebfc893ec7 adjtimex.2: Add ATTRIBUTES section
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 11:15:18 +01:00
Michael Kerrisk 55b82822e8 adjtimex.2: srcfix: update copyright
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 11:15:10 +01:00
Michael Kerrisk c40843ae0b adjtimex.2: Minor wording tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 02:21:28 +01:00
Michael Kerrisk cf19a3b98c adjtimex.2: SEE ALSO: add ntp_gettime(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 01:35:13 +01:00
Michael Kerrisk 4ed5a32d22 adjtimex.2: Minor wording and formatting fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 01:35:12 +01:00
Michael Kerrisk e837b41c13 adjtimex.2: Improve description of some PPS timex fields
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 01:35:12 +01:00
Michael Kerrisk b346e7a030 adjtimex.2: Document ntp_adjtime(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-07 01:10:23 +01:00
Michael Kerrisk 90d4198f2a adjtimex.2: Don't refer reader to adjtime(3)
Probably, it's not wise to suggest adjtime(3) as the more
portable API. Rather, ntp_adjtime(3) should be used.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-06 22:51:42 +01:00
Michael Kerrisk 46c7501043 adjtimex.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-06 11:06:11 +01:00
Michael Kerrisk de69c712ba adjtimex.2: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-06 06:21:53 +01:00
Michael Kerrisk 53ee58a32c socketpair.2: Note treatment of 'sv' on error
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-05 08:52:29 +01:00
Michael Kerrisk 89cfe0cf65 pipe.2: Note treatment of 'pipefd' on error
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-05 08:52:29 +01:00
Michael Kerrisk 9414812651 adjtimex.2: Minor fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 17:25:09 +01:00
Michael Kerrisk 178635c4e4 adjtimex.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 17:25:09 +01:00
Michael Kerrisk 1a96e4f2ba adjtimex.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 17:25:09 +01:00
Michael Kerrisk 2f01620267 adjtimex.2: Various improvements after feedback from John Stultz
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 17:25:09 +01:00
Michael Kerrisk f4d9c97d6a adjtimex.2: Note range constraints and clamping for ADJ_FREQUENCY
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 17:25:04 +01:00
Michael Kerrisk 88ec900f22 adjtimex.2: Note treatment of out-of-range buf.offset
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 14:32:46 +01:00
Michael Kerrisk a2300b58d1 adjtimex.2: Update details of buf.offset EINVAL error
Reported-by: Naresh Kamboju <naresh.kernel@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 14:32:30 +01:00
Michael Kerrisk 77a47e474d adjtimex.2: Split EINVAL error cases
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 14:07:12 +01:00
William Preston f3910b4712 adjtimex.2: Update a detail in adjtimex return value description
Starting with Linux 3.4, the time_state change is now asynchronous
and the call returns the time_state before it has been altered,
rather than after it was altered as the previous code did.

======================================================

Notes from Petr Gajdos

attached program behaves differently on 2.6 and 3.0 kernels:

*******************************************************
2.6.32.59-0.7-default

Insert LS
adjtimex() return code 1: insert leap second (TIME_INS)
Kernel leap second flag: STA_INS

Delete LS
adjtimex() return code 2: delete leap second (TIME_DEL)
Kernel leap second flag: STA_DEL

Insert LS again
adjtimex() return code 1: insert leap second (TIME_INS)
Kernel leap second flag: STA_INS

Delete LS again
adjtimex() return code 2: delete leap second (TIME_DEL)
Kernel leap second flag: STA_DEL

*******************************************************
3.0.101-0.35-default

sbsvt101:~/tmp # ./adjt
Insert LS
adjtimex() return code 0: clock synchronized (TIME_OK)
Kernel leap second flag: STA_INS

Delete LS
adjtimex() return code 1: insert leap second (TIME_INS)
Kernel leap second flag: STA_DEL

Insert LS again
adjtimex() return code 2: delete leap second (TIME_DEL)
Kernel leap second flag: STA_INS

Delete LS again
adjtimex() return code 1: insert leap second (TIME_INS)
Kernel leap second flag: STA_DEL

*******************************************************

The explanation provided by William Preston (in CC):

"""
in both cases you get the actual value of the global kernel variable
time_state.

The code changed between the two kernels in the way it handled this.

In 2.6.32.59 the adjtimex call starts a timer immediately with the
function ntp_start_leap_timer(), which sets the value of time_state
before returning to the user.

This means you will get the value TIME_INS / TIME_DEL back
immediately.

In 3.0.101, the timer has been removed and the value of time_state is
set when the microsecond field overflows. The function
second_overflow() handles this. This means the value of time_state
will not have been set when the syscall adjtimex returns, and so you
will almost certainly get the old state.

Incidentally if you remove the sleep() calls in the code for 3.0.101
you may instead see the state of TIME_OK when switching between
STA_INS / STA_DEL.

All this is completely normal and expected behaviour, since both
return the current state, however I agree it is not intuitive.

I would recommend calling adjtimex without a mode to get the actual
state of the system after waiting a second.

At the same time, William suggests the patch in the attachement.

Petr

=============== adjt.c ================

void adjtm(int);

int main()
{
    printf("Insert LS\n");
    adjtm(STA_INS);

    sleep(2);
    printf("\nDelete LS\n");
    adjtm(STA_DEL);

    sleep(2);
    printf("\nInsert LS again\n");
    adjtm(STA_INS);

    sleep(2);
    printf("\nDelete LS again\n");
    adjtm(STA_DEL);

    printf("\nRestoring initial state\n");
    adjtm(0);
}

/*************************************/
/*  Modify LS flag and print status  */
/*************************************/
void adjtm(int ls)
{
    struct timex tx;
    int rc;

    tx.modes = ADJ_STATUS;
    tx.status = ls;

    if ((rc = adjtimex(&tx)) == -1) {
	perror("adjtimex()");
	exit(1);
    }

    sleep(2);

    tx.modes = 0;
    rc = adjtimex(&tx);

    printf("adjtimex() return code %d: ", rc);
    switch (rc) {
    case TIME_OK:
	printf("clock synchronized (TIME_OK)\n");
	break;

    case TIME_INS:
	printf("insert leap second (TIME_INS)\n");
	break;

    case TIME_DEL:
	printf("delete leap second (TIME_DEL)\n");
	break;

    case TIME_OOP:
	printf("leap second in progress (TIME_OOP)\n");
	break;

    case TIME_WAIT:
	printf("leap second has occurred (TIME_WAIT)\n");
	break;

    case TIME_BAD:
	printf("clock not synchronized (TIME_BAD)\n");
	break;

    default:
	printf("Unknown return code: %i\n", rc);
	break;

    }

    printf("Kernel leap second flag: ");
    if (tx.status & STA_INS)
	printf("STA_INS\n");
    else if (tx.status & STA_DEL)
	printf("STA_DEL\n");
    else
	printf("not set\n");
}
=======================================

Reported-by: Petr Gajdos <pgajdos@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 12:22:46 +01:00
Michael Kerrisk e3548e1d64 adjtimex.2: Add some FIXMEs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-04 12:22:46 +01:00
Michael Kerrisk cd65c2b1eb semop.2: Tweak comment describing 'sempid'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-03 08:53:23 +01:00
Michael Kerrisk cff459dea2 kill.2, sigaction.2, sigpending.2, sigprocmask.2, sigsuspend.2, ctermid.3, ferror.3, fopen.3, getaddrinfo.3, getnameinfo.3, longjmp.3, rand.3, setjmp.3, sigsetops.3, sigwait.3, tzset.3: Simply FTM requirements
_XOPEN_SOURCE implies _POSIX_C_SOURCE >=2, so simplify FTM
requirements in various pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:05 +01:00
Michael Kerrisk c1016e8767 kill.2, sigaction.2, sigpending.2, sigprocmask.2, sigsuspend.2, ctermid.3, ctime.3, ferror.3, flockfile.3, fopen.3, getaddrinfo.3, getgrnam.3, getnameinfo.3, getpwnam.3, rand.3, sigsetops.3, sigwait.3, strtok.3, tzset.3, unlocked_stdio.3, feature_test_macros.7: Remove mention of the obsolete _POSIX_SOURCE macro from SYNOPSIS
_POSIX_SOURCE was a POSIX.1-1990 creation that was soon made
obsolete bu _POSIX_C_SOURCE. Retaining mention of it
in the feature test macro requirements section of the
SYNOPSIS doesn't contain important information, and may
mislead readers into actually trying to use this macro.
A few mentions of it a maintained in a some pages where
defining _POSIX_SOURCE inhibits some behavior.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk f8619b6a26 killpg.2, mknod.2, mmap.2, nice.2, readlink.2, seteuid.2, setpgid.2, setreuid.2, sigaltstack.2, symlink.2, sync.2, truncate.2, vfork.2, wait.2: Update FTM requirements (mainly _DEFAULT_SOURCE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk f8e7625cad signal.2: Update FTM requirements (_DEFAULT_SOURCE)
Also remove redundant text covering FTM details that
are already provided in feature_test_macros(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk 6b0f5f5c4c fcntl.2: Remove mention of _BSD_SOURCE to get definition of F_SETOQN/F_GETOWN
This usage went away in glibc 2.20, and the simplest remedy
is just to omit mention of it.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk 1b5de130aa chroot.2: Update FTM requirements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk bc3e200eb3 chown.2: Update FTM requirements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk 7943641180 chmod.2: Update FTM requirements
There have been a number of changes in recent glibc versions

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk 4f71ba5dbd clone.2, unshare.2: Remove mention of _BSD_SOURCE and _SVID_SOURCE
The right way to expose declarations for these Linux-specific
system calls was always _GNU_SOURCE. Mentioning the historical
use of _BSD_SOURCE and _SVID_SOURCE just clouds the issue.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk 827cdae3f1 _exit.2, abs.3, acos.3, acosh.3, asin.3, asinh.3, atan.3, atan2.3, atanh.3, atoi.3, cbrt.3, ceil.3, copysign.3, cos.3, cosh.3, div.3, erf.3, erfc.3, exp.3, exp2.3, expm1.3, fabs.3, fdim.3, finite.3, floor.3, fma.3, fmax.3, fmin.3, fmod.3, fpclassify.3, frexp.3, fwide.3, hypot.3, ilogb.3, isalpha.3, isgreater.3, iswblank.3, ldexp.3, lgamma.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, modf.3, nan.3, nextafter.3, pow.3, printf.3, remainder.3, remquo.3, rint.3, round.3, scalbln.3, scanf.3, signbit.3, sin.3, sinh.3, sqrt.3, strtod.3, strtol.3, strtoul.3, tan.3, tanh.3, tgamma.3, trunc.3, wprintf.3: Remove "or 'cc -std=c99'" from SYNOPSIS
Under the FTM requirements all of these pages document the
requirement for _ISOC99_SOURCE. And feature_test_macros(7) now
documents that "cc -std=c99" produces the same effect as defining
_ISOC99_SOURCE. So, all of these pages don't additionally need
to specify "or 'cc -std=c99'" under the FTM requirements
in the SYNOPSIS. Removing that redundant text also simplifies
the SYNOPSIS a little.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk 16347c676c chdir.2: Update FTM requirements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:04 +01:00
Michael Kerrisk c8fab0f00e getpagesize.2: Update FTM requirements (_DEFAULT_SOURCE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk a48088b0e6 fsync.2: Update FTM requirements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk b68a13bc33 fsync.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk 51c612fb9f getgroups.2, gettimeofday.2, mincore.2, readv.2, stime.2, wait4.2, addseverity.3, adjtime.3, cfree.3, dysize.3, fgetgrent.3, fgetpwent.3, futimes.3, getdirentries.3, getgrent_r.3, getgrouplist.3, getmntent.3, getnetent_r.3, getprotoent_r.3, getpwent_r.3, getrpcent_r.3, getservent_r.3, getspnam.3, gsignal.3, initgroups.3, mkdtemp.3, on_exit.3, perror.3, psignal.3, putpwent.3, rcmd.3, rpmatch.3, setbuf.3, setnetgrent.3, sigvec.3, strsep.3, syslog.3, tempnam.3, termios.3, timegm.3, timeradd.3: Update FTM requirements (_DEFAULT_SOURCE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk 52d1e2b247 setpgid.2: Correct/simplify FTM requirements for BSD setpgrp() and getpgrp()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk cf7fa0a179 brk.2, chdir.2, chmod.2, chown.2, chroot.2, getpagesize.2, getsid.2, killpg.2, mknod.2, readlink.2, setpgid.2, setreuid.2, sigaltstack.2, stat.2, symlink.2, sync.2, truncate.2, vfork.2, wait.2, wait4.2, a64l.3, acosh.3, asinh.3, atanh.3, cbrt.3, ecvt.3, expm1.3, gcvt.3, getcwd.3, getdate.3, getdtablesize.3, getgrent.3, gethostid.3, getpass.3, getpwent.3, getsubopt.3, ilogb.3, insque.3, lockf.3, log1p.3, logb.3, mkstemp.3, mktemp.3, nextafter.3, posix_memalign.3, random.3, realpath.3, remainder.3, rint.3, scalb.3, siginterrupt.3, sigset.3, strdup.3, ualarm.3, usleep.3: Remove references to _XOPEN_SOURCE_EXTENDED in SYNOPSIS
_XOPEN_SOURCE_EXTENDED is obsolete (it existed in SUSv1, but not
subsequent standards). _XOPEN_SOURCE >= 500 produces the same
effects as (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED). Modifying
the SYNOPSIS of various ages that contain:

    _XOPEN_SOURCE\ >=\ 500 ||
        _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED

to just:

    _XOPEN_SOURCE\ >=\ 500

This has the following benefits:

a) Simplifying the SYNOPSIS by removing ancient
   historical information.

b) Preventing users from being misled into using
   _XOPEN_SOURCE_EXTENDED in new source code.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk 38e3518901 adjtimex.2: Remove FTM requirements
It seems that adjtimex() never needed _BSD_SOURCE (and my
earlier commit 5918743bc8 was simply a blunder.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk b0da7b8b76 access.2, chmod.2, chown.2, link.2, mkdir.2, open.2, readlink.2, rename.2, stat.2, symlink.2, unlink.2, utimensat.2, vfork.2, dirfd.3, fexecve.3, ffs.3, fmemopen.3, getcwd.3, gethostbyname.3, getline.3, mbsnrtowcs.3, mkdtemp.3, mkfifo.3, opendir.3, printf.3, psignal.3, qecvt.3, scandir.3, stpcpy.3, stpncpy.3, strdup.3, strnlen.3, strsignal.3, ualarm.3, usleep.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcsdup.3, wcsncasecmp.3, wcsnlen.3, wcsnrtombs.3: Simply FTM requirements
Looking at <features.h> (or feature_test_macros(7)), one can
see that when _XOPEN_SOURCE is defined with the value 700
(or greater), then _POSIX_C_SOURCE is defined with the value
200809L (or greater). Therefore, terms in the man pages such as

    _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L

can be simpified to:

    _POSIX_C_SOURCE\ >=\ 200809L

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk e464f0546d _exit.2, brk.2, abs.3, acos.3, acosh.3, asin.3, asinh.3, atan.3, atan2.3, atanh.3, atoi.3, cbrt.3, ceil.3, copysign.3, cos.3, cosh.3, div.3, erf.3, erfc.3, exp.3, expm1.3, fabs.3, fdim.3, floor.3, fma.3, fmax.3, fmin.3, fmod.3, fpclassify.3, frexp.3, hypot.3, ilogb.3, isalpha.3, isgreater.3, iswblank.3, ldexp.3, lgamma.3, log.3, log10.3, log1p.3, logb.3, lrint.3, lround.3, modf.3, nan.3, nextafter.3, posix_memalign.3, pow.3, remainder.3, remquo.3, round.3, scalbln.3, scanf.3, signbit.3, sin.3, sinh.3, sqrt.3, strtod.3, strtol.3, strtoul.3, tan.3, tanh.3, tgamma.3, trunc.3: Simplify FTM requirements
Looking at <features.h> (or feature_test_macros(7)), one can
see that when _XOPEN_SOURCE is defined with the value 600
(or greater), then _POSIX_C_SOURCE is defined with the value
200112L (or greater). Therefore, terms in the man pages such as

    _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L

can be simplified to:

    _POSIX_C_SOURCE\ >=\ 200112L

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>`

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk a446ac0c68 brk.2, chroot.2, clock_nanosleep.2, getpagesize.2, posix_fadvise.2, select.2, select_tut.2, seteuid.2, clock_getcpuclockid.3, ecvt.3, exp2.3, fseeko.3, gcvt.3, getdtablesize.3, getpass.3, getw.3, log2.3, mktemp.3, mq_receive.3, mq_send.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, pthread_attr_setstack.3, rint.3, sem_wait.3, setenv.3, sockatmark.3, strerror.3: Simplify FTM requirements
Looking at <features.h> (or feature_test_macros(7)), one can
see that when _XOPEN_SOURCE is defined with the value 600
(or greater), then _POSIX_C_SOURCE is defined with the value
200112L (or greater). Therefore, terms in the man pages such as

    _XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L

can be simpified to:

    _POSIX_C_SOURCE\ >=\ 200112L

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk eb15868c65 brk.2: Update FTM requirements (_DEFAULT_SOURCE)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk d054453419 acct.2, getdomainname.2, gethostname.2, vhangup.2, daemon.3, gethostid.3, getusershell.3, profil.3: Update feature test macro requirements
Update to use _DEFAULT_SOURCE, and also changes brought by
glibc commit 266865c0e7b79d4196e2cc393693463f03c90bd8.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:03 +01:00
Michael Kerrisk 344c74c02a madvise.2: Update FTM requirements to mention _DEFAULT_SOURCE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-01 20:01:02 +01:00
Michael Kerrisk 84466c16bd semctl.2: NOTES: note when 'sempid' is set on various implementations
See https://bugzilla.kernel.org/show_bug.cgi?id=112271 and
http://thread.gmane.org/gmane.linux.kernel/2162754/
    Subject: [PATCH] Don't set sempid in semctl syscall.
    Newsgroups: gmane.linux.kernel
    Date: 2016-02-26 12:21:38 GMT

Reported-by: Davidlohr Bueso <dave@stgolabs.net>
Reported-by: Manfred Spraul <manfred@colorfullife.com>
Reported-by: Philip Semanchuk <linux_kernel.20.ick@spamgourmet.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-28 20:11:22 +01:00
Jakub Wilk 88ee5c1c61 prctl.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-28 14:39:46 +01:00
Jakub Wilk d4b9c2c3f3 utimensat.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-26 16:39:03 +01:00
Kondo, Naoya 0e886e9862 times.2: Fix an incorrect description in NOTES
The text has an incorrect description in NOTES, it says
that (2^32/HZ) - 300 is about 429 million. It is correct
only if HZ=10 which does not look common today. So just
removing "(i.e., about 429 million)" is good enough.

----
Signed-off-by: Naoya Kondo <kondo-naoya@jp.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-26 16:38:06 +01:00
Michael Kerrisk ef2c622810 truncate.2: SEE ALSO: add truncate(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-26 13:15:08 +01:00
Michael Kerrisk 7d11c72f51 sync.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-26 13:13:06 +01:00
Michael Kerrisk 5a22437855 mknod.2: SEE ALSO: add mknod(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-26 12:27:55 +01:00
Michael Kerrisk 4214760726 chown.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-25 21:33:22 +01:00
Michael Kerrisk e746db2e27 open.2: f
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 15:47:29 +01:00
Mark Post ff9225cc57 open.2: O_TMPFILE support in Btrfs
Reported-by: Petr Gajdos <pgajdos@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 15:43:55 +01:00
Michael Kerrisk e92f04afa5 get_kernel_syms.2: Note that glibc des not support this system call
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:56 +01:00
Michael Kerrisk 0eace267be init_module.2: Glibc 2.23 removed last vestiges of support for this system call
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:56 +01:00
Michael Kerrisk fa3b5cee4c delete_module.2: Glibc 2.23 removed last vestiges of support for this system call
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:56 +01:00
Michael Kerrisk c37cf7d3e8 create_module.2: Glibc 2.23 removed last vestiges of support for this system call
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:56 +01:00
Michael Kerrisk 7be3122f4f bdflush.2: Note that glibc support for this system call went away in version 2.23
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:56 +01:00
Michael Kerrisk d04b14bd3b uselib.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:56 +01:00
Michael Kerrisk b575a20f86 uselib.2: Note that glibc does not support this (obsolete) system call
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:50 +01:00
Michael Kerrisk 90493c8cf0 create_module.2, delete_module.2, query_module.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:50 +01:00
Michael Kerrisk 50f6c77429 uselib.2: Mention CONFIG_USELIB
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-22 09:21:50 +01:00
Michael Kerrisk 9a20348ccb posix_fadvise.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-19 09:02:23 +01:00
Michael Kerrisk 47c3854b91 utimensat.2: ffix + wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-17 11:17:51 +01:00
Michael Kerrisk 35acdc5d41 sigprocmask.2: Explicitly refer the reader to sigsetops(3)
This man page did not make it obvious which functions
should be used for manipulating signals sets, nor where
those functions were documented.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-17 10:53:17 +01:00
Michael Kerrisk 1b398e8099 mount.2: SEE ALSO: add findmnt(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-15 15:32:52 +01:00
Michael Kerrisk 0d7ae27d85 fcntl.2, flock.2: SEE ALSO: add lslocks(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-15 15:32:52 +01:00
Michael Kerrisk f4a44ac634 stat.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-15 13:34:44 +01:00
Michael Kerrisk 698ac0e263 chmod.2: Clarify terminology (file mode versus file permission bits)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-15 13:34:44 +01:00
Michael Kerrisk 1bab84a885 open.2: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-13 17:55:10 +01:00
Michael Kerrisk b3eb228083 gettid.2: tfix
Reported-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-13 15:58:04 +01:00
Michael Kerrisk 0f166ce187 bpf.2: Document close-on-exec semantics
The close-on-exec file descriptor flag is automatically enabled
for FDs returned by bpf().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-11 14:50:16 +01:00
Christoph Hellwig cf8bac925f sync.2: Clarify description and document the Linux data integrity guarantees
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-11 13:34:20 +01:00
Michael Kerrisk 0509285e2c stat.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-08 16:11:58 +01:00
Michael Kerrisk 368bbfa929 brk.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-08 16:11:58 +01:00
Michael Kerrisk d432f10d89 madvise.2: Tweaks and improvements to Minchan's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-08 08:24:15 +01:00
Michael Kerrisk 9ec1369898 madvise.2: Reorder MAD_FREE entry
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-08 08:24:15 +01:00
Minchan Kim cbb9ef3061 madvise.2: Document MADV_FREE
Document the MADV_FREE flag added to madvise() in Linux 4.5.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-08 08:24:15 +01:00
Michael Kerrisk d38a09fca6 fanotify_init.2: Note kernel version that allowed O_CLOEXEC for event_f_flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-06 19:31:55 +01:00
Michael Kerrisk 6b1e34f2a4 madvise.2: Put MADV_SOFT_OFFLINE into kernel version order
Exceptionally, the lists on this page are in kernel version order
rather than alphabetical order. But one entry was out of order.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-06 12:27:25 +01:00
Michael Kerrisk 11c25e24c8 madvise.2: Clarify MADV_HWPOISON wording to say that it applies to a page range
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-06 12:24:54 +01:00
Michael Kerrisk 20cc8fa829 select.2: Document spurious EAGAIN error that can occur on other systems
Light reworking of text proposed by Josh Triplett.

Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-04 12:34:06 +01:00
Michael Kerrisk f14637570d poll.2: Document spurious EAGAIN error that can occur on other systems
Light reworking of text proposed by Josh Triplett.

Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-04 12:34:06 +01:00
Michael Kerrisk 5dbb60df52 select_tut.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 15:51:42 +01:00
Michael Kerrisk 65842010f3 select_tut.2: Simplify 'if' logic in in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 14:37:40 +01:00
Michael Kerrisk 894d620ae2 select_tut.2: Use correct type (socklen_t) for addrlen
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 14:37:40 +01:00