Remove superfluous paragraph macros.
Remove ".br" if it is before a line that starts with a space
character, as such lines automatically cause a break.
###
The output is unchanged, except two empty lines are added at the
bottom (before the footer line) in the output of "nroff" for the files
"alloc_hugepages.2" and "userfaultfd.2".
###
Examples of warnings from "mandoc -Tlint":
mandoc: access.2:283:2: WARNING: skipping paragraph macro: PP after SH
mandoc: adjtimex.2:185:2: WARNING: skipping paragraph macro: PP empty
mandoc: futex.2:728:2: WARNING: skipping paragraph macro: IP empty
mandoc: getsid.2:48:2: WARNING: skipping paragraph macro: br before text line with leading blank
mandoc: init_module.2:290:2: WARNING: skipping paragraph macro: PP after SS
mandoc: ioctl_fideduperange.2:27:2: WARNING: skipping paragraph macro: br after SH
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
.BR faccessat ():
POSIX.1-2008.
.SH NOTES
-.PP
.BR Warning :
Using these calls to check if a user is authorized to, for example,
open a file before actually doing so using
}
.EE
.in
-.PP
.TP
.BR ADJ_MICRO " (since Linux 2.6.26)"
.\" commit eea83d896e318bda54be2d2770d2c5d6668d11db
The maximal number of huge pages can be specified using the
.B hugepages=
boot parameter.
-.PP
+.\".PP
.\" requires CONFIG_HUGETLB_PAGE (under "Processor type and features")
.\" and CONFIG_HUGETLBFS (under "Filesystems").
.\" mount -t hugetlbfs hugetlbfs /huge
.BR chown ()
got the newly introduced number.
.SH EXAMPLES
-.PP
The following program changes the ownership of the file named in
its second command-line argument to the value specified in its
first command-line argument.
when noting details that apply to all of these interfaces,
.\"
.SS The clone() wrapper function
-.PP
When the child process is created with the
.BR clone ()
wrapper function,
are discussed below.
.\"
.SS clone3()
-.PP
The
.BR clone3 ()
system call provides a superset of the functionality of the older
argument are discussed below.
.\"
.SS Equivalence between clone() and clone3() arguments
-.PP
Unlike the older
.BR clone ()
interface, where arguments are passed individually, in the newer
.RE
.\"
.SS The child termination signal
-.PP
When the child process terminates, a signal may be sent to the parent.
The termination signal is specified in the low byte of
.I flags
when the child terminates.
.\"
.SS The set_tid array
-.PP
By default, the kernel chooses the next sequential PID for the new
process in each of the PID namespaces where it is present.
When creating a process with
entry for this PID namespace must be 1.
.\"
.SS The flags mask
-.PP
Both
.BR clone ()
and
are Linux-specific and should not be used in programs
intended to be portable.
.SH NOTES
-.PP
One use of these systems calls
is to implement threads: multiple flows of control in a program that
run concurrently in a shared address space.
resources such as a file descriptor table,
System V semaphore undo operations, or a virtual address space.
.PP
-.PP
Handlers registered using
.BR pthread_atfork (3)
are not executed during a clone call.
returning 0 if the correct number of bytes was transferred,
or \-1 otherwise.
.SH EXAMPLES
-.PP
The following program creates an eventfd file descriptor
and then forks to create a child process.
While the parent briefly sleeps,
.SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
.SH NOTES
-.PP
Under Linux,
.BR fork ()
is implemented using copy-on-write pages, so the only penalty that it incurs
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
-.PP
The
.BR futex ()
system call provides a method for waiting until a certain condition becomes
.I timeout
is NULL, the operation can block indefinitely.
.IP
-.IP
The
.I uaddr2
argument is ignored.
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\"
.SH RETURN VALUE
-.PP
In the event of an error (and assuming that
.BR futex ()
was invoked via
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\"
.SH VERSIONS
-.PP
Futexes were first made available in a stable kernel release
with Linux 2.6.0.
.PP
Glibc 2.19 and earlier:
_BSD_SOURCE
.SH DESCRIPTION
-.PP
.BR getgroups ()
returns the supplementary group IDs of the calling process in
.IR list .
.PP
.BI "int getrusage(int " who ", struct rusage *" usage );
.SH DESCRIPTION
-.PP
.BR getrusage ()
returns resource usage measures for
.IR who ,
The number of times a context switch resulted due to a higher
priority process becoming runnable or because the current process
exceeded its time slice.
-.PP
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
.RS 4
_XOPEN_SOURCE\ >=\ 500
.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
-.br
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
.RE
.PD
.I include/linux/module.h
for some useful background information.
.SS Linux 2.4 and earlier
-.PP
In Linux 2.4 and earlier, the
.BR init_module ()
system call was rather different:
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
-.PP
The
.BR io_cancel ()
system call
.BR io_cancel ()
is not implemented on this architecture.
.SH VERSIONS
-.PP
The asynchronous I/O system calls first appeared in Linux 2.5.
.SH CONFORMING TO
-.PP
.BR io_cancel ()
is Linux-specific and should not be used
in programs that are intended to be portable.
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
-.PP
The
.BR io_destroy ()
system call
.BR io_destroy ()
is not implemented on this architecture.
.SH VERSIONS
-.PP
The asynchronous I/O system calls first appeared in Linux 2.5.
.SH CONFORMING TO
-.PP
.BR io_destroy ()
is Linux-specific and should not be used in programs
that are intended to be portable.
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
-.PP
The
.BR io_getevents ()
system call
.BR io_getevents ()
is not implemented on this architecture.
.SH VERSIONS
-.PP
The asynchronous I/O system calls first appeared in Linux 2.5.
.SH CONFORMING TO
-.PP
.BR io_getevents ()
is Linux-specific and should not be used in
programs that are intended to be portable.
may cause a segmentation fault instead of generating the error
.BR EINVAL .
.SH SEE ALSO
-.PP
.BR io_cancel (2),
.BR io_destroy (2),
.BR io_setup (2),
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
-.PP
The
.BR io_setup ()
system call
.BR io_setup ()
is not implemented on this architecture.
.SH VERSIONS
-.PP
The asynchronous I/O system calls first appeared in Linux 2.5.
.SH CONFORMING TO
-.PP
.BR io_setup ()
is Linux-specific and should not be used in programs
that are intended to be portable.
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
-.PP
The
.BR io_submit ()
system call
.B CAP_SYS_ADMIN
capability.
.SH VERSIONS
-.PP
The asynchronous I/O system calls first appeared in Linux 2.5.
.SH CONFORMING TO
-.PP
.BR io_submit ()
is Linux-specific and should not be used in
programs that are intended to be portable.
.SH NAME
ioctl_ficlonerange, ioctl_ficlone \- share some the data of one file with another file
.SH SYNOPSIS
-.br
.B #include <sys/ioctl.h>
.br
.B #include <linux/fs.h>
On error, \-1 is returned, and
.I errno
is set to indicate the error.
-.PP
.SH ERRORS
Error codes can be one of, but are not limited to, the following:
.TP
.SH NAME
ioctl_fideduperange \- share some the data of one file with another file
.SH SYNOPSIS
-.br
.B #include <sys/ioctl.h>
.br
.B #include <linux/fs.h>
for success, a negative error code in case of error, or
.B FILE_DEDUPE_RANGE_DIFFERS
if the data did not match.
-.PP
.SH RETURN VALUE
On error, \-1 is returned, and
.I errno
is set to indicate the error.
-.PP
.SH ERRORS
Error codes can be one of, but are not limited to, the following:
.TP
.SH NAME
ioctl_fslabel \- get or set a filesystem label
.SH SYNOPSIS
-.br
.B #include <sys/ioctl.h>
.br
.B #include <linux/fs.h>
On success zero is returned. On error, \-1 is returned, and
.I errno
is set to indicate the error.
-.PP
.SH ERRORS
Error can include (but are not limited to) the following:
.TP
.SH NAME
ioctl_getfsmap \- retrieve the physical layout of the filesystem
.SH SYNOPSIS
-.br
.B #include <sys/ioctl.h>
.br
.B #include <linux/fs.h>
array, which immediately follows the header data.
.\"
.SS Fields of struct fsmap_head
-.PP
The
.I fmh_iflags
field is a bit mask passed to the kernel to alter the output.
fields must be set to zero.
.\"
.SS Keys
-.PP
The two key records in
.I fsmap_head.fmh_keys
specify the lowest and highest extent records in the keyspace that the caller
provides this functionality.
.\"
.SS Fields of struct fsmap
-.PP
The
.I fmr_device
field uniquely identifies the underlying storage device.
On error, \-1 is returned, and
.I errno
is set to indicate the error.
-.PP
.SH ERRORS
The error placed in
.I errno
.BR memfd_create ()
system call is Linux-specific.
.SH NOTES
-.PP
.\" See also http://lwn.net/Articles/593918/
.\" and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
The
that the remaining nonresident pages are locked when they are populated
by a page fault.
.PP
-.PP
If
.I flags
is 0,
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines it to 1.
.SH NOTES
-.PP
Memory mapped by
.BR mmap ()
is preserved across
.SH EXAMPLES
.\" FIXME . Add an example here that uses an anonymous shared region for
.\" IPC between parent and child.
-.PP
The following program prints part of the file specified in
its first command-line argument to standard output.
The range of bytes to be printed is specified via offset and length
.BR mprotect ().
.SH EXAMPLES
.\" sigaction.2 refers to this example
-.PP
The program below demonstrates the use of
.BR mprotect ().
The program allocates four pages of memory, makes the third
.\" .BR mremap (2)
.\" call with completely different semantics.
.SH NOTES
-.PP
.BR mremap ()
changes the
mapping between virtual addresses and memory pages.
.\"
.\"
.SS O_DIRECT
-.PP
The
.B O_DIRECT
flag may impose alignment restrictions on the length and address
.BI " unsigned long " devfn );
.fi
.SH DESCRIPTION
-.PP
Most of the interaction with PCI devices is already handled by the
kernel PCI layer,
and thus these calls should not normally need to be accessed from user space.
be accessed via
.BR mmap (2).
.SS Arguments
-.PP
The
.I pid
and
To restore the old behavior, write the value 2 to
.IR /sys/devices/cpu/rdpmc .
.SS perf_event ioctl calls
-.PP
Various ioctls act on
.BR perf_event_open ()
file descriptors:
Only group leaders are enabled and disabled,
not any other members of the groups.
.SS perf_event related configuration files
-.PP
Files in
.I /proc/sys/kernel/
.RS 4
flag.
.\"
.SS Use cases for PID file descriptors
-.PP
A PID file descriptor returned by
.BR pidfd_open ()
(or by
.BR switch_root (8).
.\"
.SS pivot_root(\(dq.\(dq, \(dq.\(dq)
-.PP
.I new_root
and
.I put_old
.\" FIXME
.\" Would it be better, because simpler, to use unshare(2)
.\" rather than clone(2) in the example below?
-.PP
The program below demonstrates the use of
.BR pivot_root ()
inside a mount namespace that is created using
.B FR=1
mode only.
.IP
-.IP
Applications that use the O32 FP32 ABI can operate only when this bit is
.I unset
.RB ( FR=0 ;
If this flag is not set,
signals are read from the per-thread queue of the specified thread.
.in
-.PP
.TP
.BR PTRACE_GETSIGMASK " (since Linux 3.11)"
.\" commit 29000caecbe87b6b66f144f72111f0d02fbbf0c1
.BR ptrace ()
.BR PTRACE_ATTACH .
(See the "Ptrace access mode checking" discussion above.)
-.IP
.IP *
.BR ptrace ()
.BR PTRACE_TRACEME .
", caddr_t " addr );
.fi
.SH DESCRIPTION
-.PP
The quota system can be used to set per-user, per-group, and per-project limits
on the amount of disk space used on a filesystem.
For each user and/or group,
.IR special ", " id " and " addr
arguments are ignored.
.SH RETURN VALUE
-.PP
On success,
.BR quotactl ()
returns 0; on error \-1
.I fd
must be capable of seeking.
.SS preadv2() and pwritev2()
-.PP
These system calls are similar to
.BR preadv ()
and
in the meantime by an unrelated network event on a socket,
for example an incoming ICMP packet.
.SH EXAMPLES
-.PP
The following program uses
.BR recvmmsg ()
to receive multiple messages on a socket and stores
.\" .UR https://developer.ibm.com/javasdk/2017/09/25/concurrent-scavenge-using-guarded-storage-facility-works/
.\" the article with the description of its usage in the Java Garbage Collection
.\" .UE
-.PP
.SH SEE ALSO
.BR syscall (2)
blocks indefinitely waiting for a file descriptor to become ready.
.\"
.SS pselect()
-.PP
The
.BR pselect ()
system call allows an application to safely wait until either
.EE
.in
.PP
-.PP
The reason that
.BR pselect ()
is needed is that if one wants to wait for either a signal
nonblocking I/O is used when reading from and writing to the pipe.)
.\"
.SS Emulating usleep(3)
-.PP
Before the advent of
.BR usleep (3),
some code employed a call to
notion of the signal set.
.\"
.SS Historical glibc details
-.PP
Glibc 2.0 provided an incorrect version of
.BR pselect ()
that did not take a
.SH NAME
select, pselect \- synchronous I/O multiplexing
.SH SYNOPSIS
-.PP
See
.BR select (2)
.SH DESCRIPTION
.BR pselect (),
see
.BR select (2).
-.PP
.\"
.SS Combining signal and data events
.BR pselect ()
ID = 9
.EE
.in
-.PP
.SS Program source
\&
.nf
and so forth, until none of the specified nodes contain free memory.
Pages will not be allocated from any node not specified in the
.IR nodemask .
-.IP
.TP
.B MPOL_INTERLEAVE
This mode interleaves page allocations across the nodes specified in
setns(fd, CLONE_NEWUSER | CLONE_NEWNET | CLONE_NEWUTS);
.EE
.in
-.PP
.\"
.SS Details for specific namespace types
Note the following details and restrictions when reassociating with
.RS 4
_XOPEN_SOURCE\ >=\ 500
.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
-.br
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
.RE
.PP
into
.IR "void\ *" .
.SH NOTES
-.PP
After a
.BR fork (2),
the child inherits the attached shared memory segments.
number of shared memory segments
.RB ( SHMSEG ).
.SH EXAMPLES
-.PP
The two programs shown below exchange a string using a shared memory segment.
Further details about the programs are given below.
First, we show a shell session demonstrating their use.
Hello, world
.EE
.in
-.PP
.\"
.SS Program source: svshm_string.h
The following header file is included by the "reader" and "writer" programs.
_POSIX_C_SOURCE
.ad b
.SH DESCRIPTION
-.PP
.BR sigpending ()
returns the set of signals that are pending for delivery to the calling
thread (i.e., the signals which have been raised while blocked).
as NULL.
.\"
.SS C library/kernel differences
-.PP
The kernel's definition of
.IR sigset_t
differs in size from that used
.SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008.
.SH NOTES
-.PP
Normally,
.BR sigsuspend ()
is used in conjunction with
.BR lstat ():
.RS 4
/* glibc 2.19 and earlier */ _BSD_SOURCE
-.br
|| /* Since glibc 2.20 */ _DEFAULT_SOURCE
-.br
|| _XOPEN_SOURCE\ >=\ 500
.\" _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
-.br
|| /* Since glibc 2.10: */ _POSIX_C_SOURCE\ >=\ 200112L
.RE
.PP
.PD
.ad
.SH DESCRIPTION
-.PP
These functions return information about a file, in the buffer pointed to by
.IR statbuf .
No permissions are required on the file itself, but\(emin the case of
can be used in tools that scan directories
to prevent mass-automounting of a directory of automount points.
.IP
-.IP
This flag is Linux-specific; define
.B _GNU_SOURCE
.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
.BI "int statx(int " dirfd ", const char *" pathname ", int " flags ","
.BI " unsigned int " mask ", struct statx *" statxbuf );
.fi
-.PP
.SH DESCRIPTION
-.PP
This function returns information about a file, storing it in the buffer
pointed to by
.IR statxbuf .
(Note that reserved space and padding is omitted.)
.SS
Invoking \fBstatx\fR():
-.PP
To access a file's status, no permissions are required on the file itself,
but in the case of
.BR statx ()
extension to the buffer.
.SS
The returned information
-.PP
The status information for the target file is returned in the
.I statx
structure pointed to by
.BR inode (7).
.\"
.SS File attributes
-.PP
The
.I stx_attributes
field contains a set of ORed flags that indicate additional attributes
added in Linux 2.6.13, and removed in 2.6.16;
this system call was never available to user space.
.SH NOTES
-.PP
Roughly speaking, the code belonging to the system call
with number __NR_xxx defined in
.I /usr/include/asm/unistd.h
glibc does not provide a wrapper for this system call,
necessitating the use of
.BR syscall (2).
-.PP
.SH BUGS
The object names vary between kernel versions,
making this system call worthless for applications.
.RS 4
_XOPEN_SOURCE\ >=\ 500
.\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
-.br
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
|| /* Glibc versions <= 2.19: */ _BSD_SOURCE
.RE
.IR version ,
.IR domainname }.
.SS C library/kernel differences
-.PP
Over time, increases in the size of the
.I utsname
structure have led to three successive versions of
.\" problematic for multi-threaded monitor. I even suspect that it would be
.\" impossible to ensure synchronization between page faults and non-page
.\" fault events in multi-threaded monitor.
-.PP
+.\" .PP
.\" FIXME elaborate about non-cooperating mode, describe its limitations
.\" for kernels before 4.11, features added in 4.11
.\" and limitations remaining in 4.11
.PP
.IR Documentation/admin-guide/mm/userfaultfd.rst
in the Linux kernel source tree
-.PP
and cannot rely on any specific behavior with respect to shared memory.
.\" In AIXv3.1 vfork is equivalent to fork.
.SH NOTES
-.PP
Some consider the semantics of
.BR vfork ()
to be an architectural blemish, and the 4.2BSD man page stated:
other architectures) it is an independent system call.
Support was added in glibc 2.0.112.
.SH BUGS
-.PP
Details of the signal handling are obscure and differ between systems.
The BSD man page states:
"To avoid a possible deadlock situation, processes that are children