Various pages: retitle EXAMPLE section heading to EXAMPLES

EXAMPLES appears to be the wider majority usage across various
projects' manual pages, and is also what is used in the POSIX
manual pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-05-21 10:00:37 +02:00
parent c91a4f144c
commit a14af333d6
251 changed files with 251 additions and 251 deletions

View File

@ -178,7 +178,7 @@ Usual system default gconv module configuration file.
Usual system gconv module configuration cache. Usual system gconv module configuration cache.
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001. POSIX.1-2001.
.SH EXAMPLE .SH EXAMPLES
Convert text from the ISO 8859-15 character encoding to UTF-8: Convert text from the ISO 8859-15 character encoding to UTF-8:
.PP .PP
.in +4n .in +4n

View File

@ -136,7 +136,7 @@ Usual default locale archive location.
Usual default path for locale definition files. Usual default path for locale definition files.
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008. POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
$ \fBlocale\fP $ \fBlocale\fP
LANG=en_US.UTF\-8 LANG=en_US.UTF\-8

View File

@ -373,7 +373,7 @@ An output file that contains information about formatting of data and
time values. time values.
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2008. POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
Compile the locale files for Finnish in the UTF\-8 character set Compile the locale files for Finnish in the UTF\-8 character set
and add it to the default locale archive with the name and add it to the default locale archive with the name
.BR fi_FI.UTF\-8 : .BR fi_FI.UTF\-8 :

View File

@ -201,7 +201,7 @@ Exit status is equal to the exit status of profiled program.
To report bugs, see To report bugs, see
.UR http://www.gnu.org/software/libc/bugs.html .UR http://www.gnu.org/software/libc/bugs.html
.UE .UE
.SH EXAMPLE .SH EXAMPLES
Below is a simple program that reallocates a block of Below is a simple program that reallocates a block of
memory in cycles that rise to a peak before then cyclically memory in cycles that rise to a peak before then cyclically
reallocating the memory in smaller blocks that return to zero. reallocating the memory in smaller blocks that return to zero.

View File

@ -82,7 +82,7 @@ Print version information and exit.
To report bugs, see To report bugs, see
.UR http://www.gnu.org/software/libc/bugs.html .UR http://www.gnu.org/software/libc/bugs.html
.UE .UE
.SH EXAMPLE .SH EXAMPLES
See See
.BR memusage (1). .BR memusage (1).
.SH SEE ALSO .SH SEE ALSO

View File

@ -103,7 +103,7 @@ was broken: it just hung when executed.
.\" glibc commit 1a4c27355e146b6d8cc6487b998462c7fdd1048f .\" glibc commit 1a4c27355e146b6d8cc6487b998462c7fdd1048f
This problem was fixed in glibc 2.30, and the fix has been backported This problem was fixed in glibc 2.30, and the fix has been backported
to earlier glibc versions in some distributions. to earlier glibc versions in some distributions.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
$ \fBecho $$\fP # Display PID of shell $ \fBecho $$\fP # Display PID of shell
1143 1143

View File

@ -76,7 +76,7 @@ Display the program version and exit.
The The
.B sprof .B sprof
command is a GNU extension, not present in POSIX.1. command is a GNU extension, not present in POSIX.1.
.SH EXAMPLE .SH EXAMPLES
The following example demonstrates the use of The following example demonstrates the use of
.BR sprof . .BR sprof .
The example consists of a main program that calls two functions The example consists of a main program that calls two functions

View File

@ -139,7 +139,7 @@ passed by-value or by-pointer (for aggregates like structs).
.\" header file contains the required SYS_foo definition. .\" header file contains the required SYS_foo definition.
.\" Otherwise, the use of a _syscall macro is required. .\" Otherwise, the use of a _syscall macro is required.
.\" .\"
.SH EXAMPLE .SH EXAMPLES
.EX .EX
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -367,7 +367,7 @@ standard wanted to change it into a \fIsize_t\ *\fPC;
.\" SunOS 5 has 'size_t *' .\" SunOS 5 has 'size_t *'
later POSIX standards and glibc 2.x have later POSIX standards and glibc 2.x have
.IR "socklen_t\ * ". .IR "socklen_t\ * ".
.SH EXAMPLE .SH EXAMPLES
See See
.BR bind (2). .BR bind (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -221,7 +221,7 @@ A wrapper is provided in the
package. package.
When employing the wrapper in that library, link with When employing the wrapper in that library, link with
.IR \-lkeyutils . .IR \-lkeyutils .
.SH EXAMPLE .SH EXAMPLES
The program below creates a key with the type, description, and payload The program below creates a key with the type, description, and payload
specified in its command-line arguments, specified in its command-line arguments,
and links that key into the session keyring. and links that key into the session keyring.

View File

@ -256,7 +256,7 @@ type, see
.SH BUGS .SH BUGS
The transparent proxy options are not described. The transparent proxy options are not described.
.\" FIXME Document transparent proxy options .\" FIXME Document transparent proxy options
.SH EXAMPLE .SH EXAMPLES
An example of the use of An example of the use of
.BR bind () .BR bind ()
with Internet domain sockets can be found in with Internet domain sockets can be found in

View File

@ -446,7 +446,7 @@ as the old
has got the same syscall number, and has got the same syscall number, and
.BR chown () .BR chown ()
got the newly introduced number. got the newly introduced number.
.SH EXAMPLE .SH EXAMPLES
.PP .PP
The following program changes the ownership of the file named in The following program changes the ownership of the file named in
its second command-line argument to the value specified in its its second command-line argument to the value specified in its

View File

@ -437,7 +437,7 @@ and
.BR CLOCK_THREAD_CPUTIME_ID , .BR CLOCK_THREAD_CPUTIME_ID ,
on systems that provide such an implementation on systems that provide such an implementation
(i.e., Linux 2.6.12 and later). (i.e., Linux 2.6.12 and later).
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates the use of The program below demonstrates the use of
.BR clock_gettime () .BR clock_gettime ()
and and

View File

@ -1771,7 +1771,7 @@ mypid = syscall(SYS_getpid);
Because of the stale-cache problem, as well as other problems noted in Because of the stale-cache problem, as well as other problems noted in
.BR getpid (2), .BR getpid (2),
the PID caching feature was removed in glibc 2.25. the PID caching feature was removed in glibc 2.25.
.SH EXAMPLE .SH EXAMPLES
The following program demonstrates the use of The following program demonstrates the use of
.BR clone () .BR clone ()
to create a child process that executes in a separate UTS namespace. to create a child process that executes in a separate UTS namespace.

View File

@ -286,7 +286,7 @@ If
fails, consider the state of the socket as unspecified. fails, consider the state of the socket as unspecified.
Portable applications should close the socket and create a new one for Portable applications should close the socket and create a new one for
reconnecting. reconnecting.
.SH EXAMPLE .SH EXAMPLES
An example of the use of An example of the use of
.BR connect () .BR connect ()
is shown in is shown in

View File

@ -226,7 +226,7 @@ gives filesystems an opportunity to implement "copy acceleration" techniques,
such as the use of reflinks (i.e., two or more inodes that share such as the use of reflinks (i.e., two or more inodes that share
pointers to the same copy-on-write disk blocks) pointers to the same copy-on-write disk blocks)
or server-side-copy (in the case of NFS). or server-side-copy (in the case of NFS).
.SH EXAMPLE .SH EXAMPLES
.EX .EX
#define _GNU_SOURCE #define _GNU_SOURCE
#include <fcntl.h> #include <fcntl.h>

View File

@ -357,7 +357,7 @@ The functions perform the read and write operations on an
eventfd file descriptor, eventfd file descriptor,
returning 0 if the correct number of bytes was transferred, returning 0 if the correct number of bytes was transferred,
or \-1 otherwise. or \-1 otherwise.
.SH EXAMPLE .SH EXAMPLES
.PP .PP
The following program creates an eventfd file descriptor The following program creates an eventfd file descriptor
and then forks to create a child process. and then forks to create a child process.

View File

@ -780,7 +780,7 @@ Since UNIX\ V7, both are NULL.
.\" .BR execve () .\" .BR execve ()
.\" that could be exploited for denial of service by a suitably crafted .\" that could be exploited for denial of service by a suitably crafted
.\" ELF binary. There are no known problems with 2.0.34 or 2.2.15. .\" ELF binary. There are no known problems with 2.0.34 or 2.2.15.
.SH EXAMPLE .SH EXAMPLES
The following program is designed to be execed by the second program below. The following program is designed to be execed by the second program below.
It just echoes its command-line arguments, one per line. It just echoes its command-line arguments, one per line.
.PP .PP

View File

@ -309,7 +309,7 @@ The glibc wrapper invokes any fork handlers that have been
established using established using
.BR pthread_atfork (3). .BR pthread_atfork (3).
.\" and does some magic to ensure that getpid(2) returns the right value. .\" and does some magic to ensure that getpid(2) returns the right value.
.SH EXAMPLE .SH EXAMPLES
See See
.BR pipe (2) .BR pipe (2)
and and

View File

@ -1711,7 +1711,7 @@ various POSIX threads synchronization mechanisms
.\" .\"
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\" .\"
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates use of futexes in a program where a parent The program below demonstrates use of futexes in a program where a parent
process and a child process use a pair of futexes located inside a process and a child process use a pair of futexes located inside a
shared anonymous mapping to synchronize access to a shared resource: shared anonymous mapping to synchronize access to a shared resource:

View File

@ -228,7 +228,7 @@ instead of these system calls.
.PP .PP
These calls supersede These calls supersede
.BR readdir (2). .BR readdir (2).
.SH EXAMPLE .SH EXAMPLES
.\" FIXME The example program needs to be revised, since it uses the older .\" FIXME The example program needs to be revised, since it uses the older
.\" getdents() system call and the structure with smaller field widths. .\" getdents() system call and the structure with smaller field widths.
The program below demonstrates the use of The program below demonstrates the use of

View File

@ -776,7 +776,7 @@ and
.BR getrlimit () .BR getrlimit ()
as wrapper functions that call as wrapper functions that call
.BR prlimit (). .BR prlimit ().
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates the use of The program below demonstrates the use of
.BR prlimit (). .BR prlimit ().
.PP .PP

View File

@ -148,7 +148,7 @@ These system calls are Linux-specific.
.\" and the SGI XFS development team, .\" and the SGI XFS development team,
.\" .RI < linux-xfs@oss.sgi.com >. .\" .RI < linux-xfs@oss.sgi.com >.
.\" Please send any bug reports or comments to these addresses. .\" Please send any bug reports or comments to these addresses.
.SH EXAMPLE .SH EXAMPLES
See See
.BR listxattr (2). .BR listxattr (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -140,7 +140,7 @@ is not a directory.
Inotify was merged into the 2.6.13 Linux kernel. Inotify was merged into the 2.6.13 Linux kernel.
.SH CONFORMING TO .SH CONFORMING TO
This system call is Linux-specific. This system call is Linux-specific.
.SH EXAMPLE .SH EXAMPLES
See See
.BR inotify (7). .BR inotify (7).
.SH SEE ALSO .SH SEE ALSO

View File

@ -243,7 +243,7 @@ was introduced in version 3.11
of the Linux kernel. of the Linux kernel.
.SH CONFORMING TO .SH CONFORMING TO
This API is Linux-specific. This API is Linux-specific.
.SH EXAMPLE .SH EXAMPLES
.SS Toggling the archive flag .SS Toggling the archive flag
The following program demonstrates the usage of The following program demonstrates the usage of
.BR ioctl (2) .BR ioctl (2)

View File

@ -363,7 +363,7 @@ operation first appeared in Linux 4.12.
.SH CONFORMING TO .SH CONFORMING TO
This API is Linux-specific. This API is Linux-specific.
Not all filesystems support it. Not all filesystems support it.
.SH EXAMPLE .SH EXAMPLES
See See
.I io/fsmap.c .I io/fsmap.c
in the in the

View File

@ -186,7 +186,7 @@ does not refer to a
file. file.
.SH CONFORMING TO .SH CONFORMING TO
Namespaces and the operations described on this page are a Linux-specific. Namespaces and the operations described on this page are a Linux-specific.
.SH EXAMPLE .SH EXAMPLES
The example shown below uses the The example shown below uses the
.BR ioctl (2) .BR ioctl (2)
operations described above to perform simple operations described above to perform simple

View File

@ -549,7 +549,7 @@ Inappropriate
.TP .TP
.B EPERM .B EPERM
Insufficient permission. Insufficient permission.
.SH EXAMPLE .SH EXAMPLES
Check the condition of DTR on the serial port. Check the condition of DTR on the serial port.
.PP .PP
.EX .EX

View File

@ -679,7 +679,7 @@ operation that queries features availability and reopened before
the second the second
.BR UFFDIO_API .BR UFFDIO_API
operation that actually enables the desired features. operation that actually enables the desired features.
.SH EXAMPLE .SH EXAMPLES
See See
.BR userfaultfd (2). .BR userfaultfd (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -319,7 +319,7 @@ See
.BR clone (2) .BR clone (2)
for some background information on the shared resources for some background information on the shared resources
referred to on this page. referred to on this page.
.SH EXAMPLE .SH EXAMPLES
The program below uses The program below uses
.BR kcmp () .BR kcmp ()
to test whether pairs of file descriptors refer to to test whether pairs of file descriptors refer to

View File

@ -1961,7 +1961,7 @@ When employing the wrapper in that library, link with
However, rather than using this system call directly, However, rather than using this system call directly,
you probably want to use the various library functions you probably want to use the various library functions
mentioned in the descriptions of individual operations above. mentioned in the descriptions of individual operations above.
.SH EXAMPLE .SH EXAMPLES
The program below provide subset of the functionality of the The program below provide subset of the functionality of the
.BR request-key (8) .BR request-key (8)
program provided by the program provided by the

View File

@ -175,7 +175,7 @@ with the value 128.
.\" The following is now rather historic information (MTK, Jun 05) .\" The following is now rather historic information (MTK, Jun 05)
.\" Don't rely on this value in portable applications since BSD .\" Don't rely on this value in portable applications since BSD
.\" (and some BSD-derived systems) limit the backlog to 5. .\" (and some BSD-derived systems) limit the backlog to 5.
.SH EXAMPLE .SH EXAMPLES
See See
.BR bind (2). .BR bind (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -171,7 +171,7 @@ attribute name list returned by
.BR listxattr (7). .BR listxattr (7).
If the total size of attribute names attached to a file exceeds this limit, If the total size of attribute names attached to a file exceeds this limit,
it is no longer possible to retrieve the list of attribute names. it is no longer possible to retrieve the list of attribute names.
.SH EXAMPLE .SH EXAMPLES
The following program demonstrates the usage of The following program demonstrates the usage of
.BR listxattr () .BR listxattr ()
and and

View File

@ -270,7 +270,7 @@ Examples where
.BR membarrier () .BR membarrier ()
can be useful include implementations can be useful include implementations
of Read-Copy-Update libraries and garbage collectors. of Read-Copy-Update libraries and garbage collectors.
.SH EXAMPLE .SH EXAMPLES
Assuming a multithreaded application where "fast_path()" is executed Assuming a multithreaded application where "fast_path()" is executed
very frequently, and where "slow_path()" is executed infrequently, the very frequently, and where "slow_path()" is executed infrequently, the
following code (x86) can be transformed using following code (x86) can be transformed using

View File

@ -341,7 +341,7 @@ If desired, the second process can apply further seals
to impose additional restrictions (so long as the to impose additional restrictions (so long as the
.BR F_SEAL_SEAL .BR F_SEAL_SEAL
seal has not yet been applied). seal has not yet been applied).
.SH EXAMPLE .SH EXAMPLES
Below are shown two example programs that demonstrate the use of Below are shown two example programs that demonstrate the use of
.BR memfd_create () .BR memfd_create ()
and the file sealing API. and the file sealing API.

View File

@ -904,7 +904,7 @@ however, this doesn't work on
.BR tmpfs (5) .BR tmpfs (5)
(for example, when using the POSIX shared memory interface documented in (for example, when using the POSIX shared memory interface documented in
.BR shm_overview (7)). .BR shm_overview (7)).
.SH EXAMPLE .SH EXAMPLES
.\" FIXME . Add an example here that uses an anonymous shared region for .\" FIXME . Add an example here that uses an anonymous shared region for
.\" IPC between parent and child. .\" IPC between parent and child.
.PP .PP

View File

@ -283,7 +283,7 @@ When called this way, the operation of
.BR pkey_mprotect () .BR pkey_mprotect ()
is equivalent to is equivalent to
.BR mprotect (). .BR mprotect ().
.SH EXAMPLE .SH EXAMPLES
.\" sigaction.2 refers to this example .\" sigaction.2 refers to this example
.PP .PP
The program below demonstrates the use of The program below demonstrates the use of

View File

@ -571,7 +571,7 @@ this error was not diagnosed by
This bug is fixed This bug is fixed
.\" commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c .\" commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c
in Linux 3.14. in Linux 3.14.
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates the use of The program below demonstrates the use of
.BR msgsnd () .BR msgsnd ()
and and

View File

@ -467,7 +467,7 @@ in order to produce the
.IR mount_fd .IR mount_fd
argument used by argument used by
.BR open_by_handle_at (). .BR open_by_handle_at ().
.SH EXAMPLE .SH EXAMPLES
The two programs below demonstrate the use of The two programs below demonstrate the use of
.BR name_to_handle_at () .BR name_to_handle_at ()
and and

View File

@ -3390,7 +3390,7 @@ Various generalized events have had wrong values.
For example, retired branches measured For example, retired branches measured
the wrong thing on AMD machines until Linux 2.6.35. the wrong thing on AMD machines until Linux 2.6.35.
.\" commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2 .\" commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2
.SH EXAMPLE .SH EXAMPLES
The following is a short example that measures the total The following is a short example that measures the total
instruction count of a call to instruction count of a call to
.BR printf (3). .BR printf (3).

View File

@ -193,7 +193,7 @@ furthermore, the file descriptor obtained in this way is
.I not .I not
pollable and can't be waited on with pollable and can't be waited on with
.BR waitid (2). .BR waitid (2).
.SH EXAMPLE .SH EXAMPLES
The program below opens a PID file descriptor for the The program below opens a PID file descriptor for the
process whose PID is specified as its command-line argument. process whose PID is specified as its command-line argument.
It then uses It then uses

View File

@ -176,7 +176,7 @@ if that process terminates,
.BR pidfd_send_signal () .BR pidfd_send_signal ()
fails with the error fails with the error
.BR ESRCH . .BR ESRCH .
.SH EXAMPLE .SH EXAMPLES
.nf .nf
#define _GNU_SOURCE #define _GNU_SOURCE
#include <limits.h> #include <limits.h>

View File

@ -216,7 +216,7 @@ wrapper function transparently deals with this.
See See
.BR syscall (2) .BR syscall (2)
for information regarding registers used for storing second file descriptor. for information regarding registers used for storing second file descriptor.
.SH EXAMPLE .SH EXAMPLES
.\" fork.2 refers to this example program. .\" fork.2 refers to this example program.
The following program creates a pipe, and then The following program creates a pipe, and then
.BR fork (2)s .BR fork (2)s

View File

@ -271,7 +271,7 @@ at that time that the implementation might change before final release.
However, the behavior stated in DESCRIPTION However, the behavior stated in DESCRIPTION
has remained consistent since this system call has remained consistent since this system call
was first implemented and will not change now. was first implemented and will not change now.
.SH EXAMPLE .SH EXAMPLES
.\" FIXME .\" FIXME
.\" Would it be better, because simpler, to use unshare(2) .\" Would it be better, because simpler, to use unshare(2)
.\" rather than clone(2) in the example below? .\" rather than clone(2) in the example below?

View File

@ -131,7 +131,7 @@ or after it is freed via
.BR pkey_free ()), .BR pkey_free ()),
the kernel may make arbitrary changes to the parts of the the kernel may make arbitrary changes to the parts of the
rights register affecting access to that key. rights register affecting access to that key.
.SH EXAMPLE .SH EXAMPLES
See See
.BR pkeys (7). .BR pkeys (7).
.SH SEE ALSO .SH SEE ALSO

View File

@ -477,7 +477,7 @@ notion of the sigset.
See the discussion of spurious readiness notifications under the See the discussion of spurious readiness notifications under the
BUGS section of BUGS section of
.BR select (2). .BR select (2).
.SH EXAMPLE .SH EXAMPLES
The program below opens each of the files named in its command-line The program below opens each of the files named in its command-line
arguments and monitors the resulting file descriptors for readiness to read arguments and monitors the resulting file descriptors for readiness to read
.RB ( POLLIN ). .RB ( POLLIN ).

View File

@ -299,7 +299,7 @@ when using, for example, shared memory or pipes).
.\" Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/ .\" Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
.\" See also some benchmarks at http://lwn.net/Articles/405284/ .\" See also some benchmarks at http://lwn.net/Articles/405284/
.\" and http://marc.info/?l=linux-mm&m=130105930902915&w=2 .\" and http://marc.info/?l=linux-mm&m=130105930902915&w=2
.SH EXAMPLE .SH EXAMPLES
The following code sample demonstrates the use of The following code sample demonstrates the use of
.BR process_vm_readv (). .BR process_vm_readv ().
It reads 20 bytes at the address 0x10000 from the process with PID 10 It reads 20 bytes at the address 0x10000 from the process with PID 10

View File

@ -272,7 +272,7 @@ glibc constructs a pathname based on the symbolic link in
that corresponds to the that corresponds to the
.IR dirfd .IR dirfd
argument. argument.
.SH EXAMPLE .SH EXAMPLES
The following program allocates the buffer needed by The following program allocates the buffer needed by
.BR readlink () .BR readlink ()
dynamically from the information provided by dynamically from the information provided by

View File

@ -408,7 +408,7 @@ that the system is running a Linux kernel older than version 2.6.18
And since glibc 2.20 And since glibc 2.20
(which requires a minimum Linux kernel version of 2.6.32), (which requires a minimum Linux kernel version of 2.6.32),
the glibc wrapper functions always just directly invoke the system calls. the glibc wrapper functions always just directly invoke the system calls.
.SH EXAMPLE .SH EXAMPLES
The following code sample demonstrates the use of The following code sample demonstrates the use of
.BR writev (): .BR writev ():
.PP .PP

View File

@ -545,7 +545,7 @@ See
.BR recvmmsg (2) .BR recvmmsg (2)
for information about a Linux-specific system call for information about a Linux-specific system call
that can be used to receive multiple datagrams in a single call. that can be used to receive multiple datagrams in a single call.
.SH EXAMPLE .SH EXAMPLES
An example of the use of An example of the use of
.BR recvfrom () .BR recvfrom ()
is shown in is shown in

View File

@ -189,7 +189,7 @@ The error code is expected to be returned on a subsequent call to
In the current implementation, however, the error code can be overwritten In the current implementation, however, the error code can be overwritten
in the meantime by an unrelated network event on a socket, in the meantime by an unrelated network event on a socket,
for example an incoming ICMP packet. for example an incoming ICMP packet.
.SH EXAMPLE .SH EXAMPLES
.PP .PP
The following program uses The following program uses
.BR recvmmsg () .BR recvmmsg ()

View File

@ -444,7 +444,7 @@ A wrapper is provided in the
package. package.
When employing the wrapper in that library, link with When employing the wrapper in that library, link with
.IR \-lkeyutils . .IR \-lkeyutils .
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates the use of The program below demonstrates the use of
.BR request_key (). .BR request_key ().
The The

View File

@ -303,7 +303,7 @@ counting those which are set, and stop upon reaching the value returned by
.BR CPU_COUNT (3) .BR CPU_COUNT (3)
(rather than iterating over the number of bits (rather than iterating over the number of bits
requested to be allocated). requested to be allocated).
.SH EXAMPLE .SH EXAMPLES
The program below creates a child process. The program below creates a child process.
The parent and child then each assign themselves to a specified CPU The parent and child then each assign themselves to a specified CPU
and execute identical loops that consume some CPU time. and execute identical loops that consume some CPU time.

View File

@ -909,7 +909,7 @@ addressing mode modifier yields an immediate mode operand
whose value is the size of the whose value is the size of the
.IR seccomp_data .IR seccomp_data
buffer. buffer.
.SH EXAMPLE .SH EXAMPLES
The program below accepts four or more arguments. The program below accepts four or more arguments.
The first three arguments are a system call number, The first three arguments are a system call number,
a numeric architecture identifier, and an error number. a numeric architecture identifier, and an error number.

View File

@ -710,7 +710,7 @@ system call has the same behavior,
but the glibc wrapper hides this behavior by internally copying the but the glibc wrapper hides this behavior by internally copying the
.I timeout .I timeout
to a local variable and passing that variable to the system call. to a local variable and passing that variable to the system call.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -346,7 +346,7 @@ API provides an interface that is more efficient than
and and
.BR poll (2) .BR poll (2)
when monitoring large numbers of file descriptors. when monitoring large numbers of file descriptors.
.SH EXAMPLE .SH EXAMPLES
Here is an example that better demonstrates the true utility of Here is an example that better demonstrates the true utility of
.BR select (). .BR select ().
The listing below is a TCP forwarding program that forwards The listing below is a TCP forwarding program that forwards

View File

@ -639,7 +639,7 @@ operations.
This was rectified This was rectified
.\" commit a5f4db877177d2a3d7ae62a7bac3a5a27e083d7f .\" commit a5f4db877177d2a3d7ae62a7bac3a5a27e083d7f
in Linux 4.6. in Linux 4.6.
.SH EXAMPLE .SH EXAMPLES
See See
.BR shmop (2). .BR shmop (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -313,7 +313,7 @@ The name choice
was perhaps unfortunate, was perhaps unfortunate,
.B IPC_NEW .B IPC_NEW
would more clearly show its function. would more clearly show its function.
.SH EXAMPLE .SH EXAMPLES
The program shown below uses The program shown below uses
.BR semget () .BR semget ()
to create a new semaphore set or retrieve the ID of an existing set. to create a new semaphore set or retrieve the ID of an existing set.

View File

@ -517,7 +517,7 @@ This bug is fixed in kernel 2.6.11.
.\" http://marc.theaimsgroup.com/?l=linux-kernel&m=110260821123863&w=2 .\" http://marc.theaimsgroup.com/?l=linux-kernel&m=110260821123863&w=2
.\" the fix: .\" the fix:
.\" http://marc.theaimsgroup.com/?l=linux-kernel&m=110261701025794&w=2 .\" http://marc.theaimsgroup.com/?l=linux-kernel&m=110261701025794&w=2
.SH EXAMPLE .SH EXAMPLES
The following code segment uses The following code segment uses
.BR semop () .BR semop ()
to atomically wait for the value of semaphore 0 to become zero, to atomically wait for the value of semaphore 0 to become zero,

View File

@ -458,7 +458,7 @@ Linux may return
.B EPIPE .B EPIPE
instead of instead of
.BR ENOTCONN . .BR ENOTCONN .
.SH EXAMPLE .SH EXAMPLES
An example of the use of An example of the use of
.BR sendto () .BR sendto ()
is shown in is shown in

View File

@ -174,7 +174,7 @@ The caller can retry the transmission,
starting at the first failed message, but there is no guarantee that, starting at the first failed message, but there is no guarantee that,
if an error is returned, it will be the same as the one that was lost if an error is returned, it will be the same as the one that was lost
on the previous call. on the previous call.
.SH EXAMPLE .SH EXAMPLES
The example below uses The example below uses
.BR sendmmsg () .BR sendmmsg ()
to send to send

View File

@ -253,7 +253,7 @@ a new thread is created using
.BR clone (2) .BR clone (2)
can be changed using can be changed using
.BR setns (). .BR setns ().
.SH EXAMPLE .SH EXAMPLES
The program below takes two or more arguments. The program below takes two or more arguments.
The first argument specifies the pathname of a namespace file in an existing The first argument specifies the pathname of a namespace file in an existing
.I /proc/[pid]/ns/ .I /proc/[pid]/ns/

View File

@ -411,7 +411,7 @@ The name choice
was perhaps unfortunate, was perhaps unfortunate,
.B IPC_NEW .B IPC_NEW
would more clearly show its function. would more clearly show its function.
.SH EXAMPLE .SH EXAMPLES
See See
.BR shmop (2). .BR shmop (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -291,7 +291,7 @@ is the same as the system page size.)
The implementation places no intrinsic per-process limit on the The implementation places no intrinsic per-process limit on the
number of shared memory segments number of shared memory segments
.RB ( SHMSEG ). .RB ( SHMSEG ).
.SH EXAMPLE .SH EXAMPLES
.PP .PP
The two programs shown below exchange a string using a shared memory segment. The two programs shown below exchange a string using a shared memory segment.
Further details about the programs are given below. Further details about the programs are given below.

View File

@ -1035,7 +1035,7 @@ prevents not only the delivered signal from being masked during
execution of the handler, but also the signals specified in execution of the handler, but also the signals specified in
.IR sa_mask . .IR sa_mask .
This bug was fixed in kernel 2.6.14. This bug was fixed in kernel 2.6.14.
.SH EXAMPLE .SH EXAMPLES
See See
.BR mprotect (2). .BR mprotect (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -324,7 +324,7 @@ give an error if
.B SS_ONSTACK .B SS_ONSTACK
is specified in is specified in
.IR ss.ss_flags . .IR ss.ss_flags .
.SH EXAMPLE .SH EXAMPLES
The following code segment demonstrates the use of The following code segment demonstrates the use of
.BR sigaltstack () .BR sigaltstack ()
(and (and

View File

@ -444,7 +444,7 @@ and
fields are not filled in with the data accompanying a signal sent by fields are not filled in with the data accompanying a signal sent by
.BR sigqueue (3). .BR sigqueue (3).
.\" The fix also was put into 2.6.24.5 .\" The fix also was put into 2.6.24.5
.SH EXAMPLE .SH EXAMPLES
The program below accepts the signals The program below accepts the signals
.B SIGINT .B SIGINT
and and

View File

@ -485,7 +485,7 @@ families.
However, already the BSD man page promises: "The protocol However, already the BSD man page promises: "The protocol
family generally is the same as the address family", and subsequent family generally is the same as the address family", and subsequent
standards use AF_* everywhere. standards use AF_* everywhere.
.SH EXAMPLE .SH EXAMPLES
An example of the use of An example of the use of
.BR socket () .BR socket ()
is shown in is shown in

View File

@ -261,7 +261,7 @@ was required to be a pipe.
Since Linux 2.6.31, Since Linux 2.6.31,
.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d .\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
both arguments may refer to pipes. both arguments may refer to pipes.
.SH EXAMPLE .SH EXAMPLES
See See
.BR tee (2). .BR tee (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -262,7 +262,7 @@ See
.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/ .UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
.UE .UE
for the recommended libraries. for the recommended libraries.
.SH EXAMPLE .SH EXAMPLES
See See
.BR spu_run (2) .BR spu_run (2)
for an example of the use of for an example of the use of

View File

@ -204,7 +204,7 @@ See
.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/ .UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
.UE .UE
for the recommended libraries. for the recommended libraries.
.SH EXAMPLE .SH EXAMPLES
The following is an example of running a simple, one-instruction SPU The following is an example of running a simple, one-instruction SPU
program with the program with the
.BR spu_run () .BR spu_run ()

View File

@ -640,7 +640,7 @@ wrapper function is actually called
or, on some architectures, or, on some architectures,
.\" strace(1) shows the name "newfstatat" on x86-64 .\" strace(1) shows the name "newfstatat" on x86-64
.BR newfstatat (). .BR newfstatat ().
.SH EXAMPLE .SH EXAMPLES
The following program calls The following program calls
.BR lstat () .BR lstat ()
and displays selected fields in the returned and displays selected fields in the returned

View File

@ -369,7 +369,7 @@ arguments 5 through 8 on the user stack.
.PP .PP
Note that these tables don't cover the entire calling convention\(emsome Note that these tables don't cover the entire calling convention\(emsome
architectures may indiscriminately clobber other registers not listed here. architectures may indiscriminately clobber other registers not listed here.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
#define _GNU_SOURCE #define _GNU_SOURCE
#include <unistd.h> #include <unistd.h>

View File

@ -133,7 +133,7 @@ Not all available objects are properly documented.
.PP .PP
It is not yet possible to change operating system by writing to It is not yet possible to change operating system by writing to
.IR /proc/sys/kernel/ostype . .IR /proc/sys/kernel/ostype .
.SH EXAMPLE .SH EXAMPLES
.EX .EX
#define _GNU_SOURCE #define _GNU_SOURCE
#include <unistd.h> #include <unistd.h>

View File

@ -133,7 +133,7 @@ under the covers,
.BR tee () .BR tee ()
assigns data to the output by merely grabbing assigns data to the output by merely grabbing
a reference to the input. a reference to the input.
.SH EXAMPLE .SH EXAMPLES
The example below implements a basic The example below implements a basic
.BR tee (1) .BR tee (1)
program using the program using the

View File

@ -335,7 +335,7 @@ and in glibc versions before 2.17,
.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460 .\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
the implementation falls back to this technique on systems the implementation falls back to this technique on systems
running pre-2.6 Linux kernels. running pre-2.6 Linux kernels.
.SH EXAMPLE .SH EXAMPLES
The program below takes two arguments: a sleep period in seconds, The program below takes two arguments: a sleep period in seconds,
and a timer frequency in nanoseconds. and a timer frequency in nanoseconds.
The program establishes a handler for the signal it uses for the timer, The program establishes a handler for the signal it uses for the timer,

View File

@ -126,7 +126,7 @@ if the timer overrun value exceeds the maximum representable integer,
the counter cycles, starting once more from low values. the counter cycles, starting once more from low values.
.\" Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665 .\" Bug filed: http://bugzilla.kernel.org/show_bug.cgi?id=12665
.\" http://thread.gmane.org/gmane.linux.kernel/113276/ .\" http://thread.gmane.org/gmane.linux.kernel/113276/
.SH EXAMPLE .SH EXAMPLES
See See
.BR timer_create (2). .BR timer_create (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -206,7 +206,7 @@ is negative or greater than 999,999,999.
These system calls are available since Linux 2.6. These system calls are available since Linux 2.6.
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008. POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
See See
.BR timer_create (2). .BR timer_create (2).
.SH SEE ALSO .SH SEE ALSO

View File

@ -552,7 +552,7 @@ Currently,
.BR timerfd_create () .BR timerfd_create ()
supports fewer types of clock IDs than supports fewer types of clock IDs than
.BR timer_create (2). .BR timer_create (2).
.SH EXAMPLE .SH EXAMPLES
The following program creates a timer and then monitors its progress. The following program creates a timer and then monitors its progress.
The program accepts up to three command-line arguments. The program accepts up to three command-line arguments.
The first argument specifies the number of seconds for The first argument specifies the number of seconds for

View File

@ -460,7 +460,7 @@ Such functionality may be added in the future, if required.
.\"be incrementally added to unshare without affecting legacy .\"be incrementally added to unshare without affecting legacy
.\"applications using unshare. .\"applications using unshare.
.\" .\"
.SH EXAMPLE .SH EXAMPLES
The program below provides a simple implementation of the The program below provides a simple implementation of the
.BR unshare (1) .BR unshare (1)
command, which unshares one or more namespaces and executes the command, which unshares one or more namespaces and executes the

View File

@ -483,7 +483,7 @@ might be created.
In this case, a spurious In this case, a spurious
.B UFFD_EVENT_FORK .B UFFD_EVENT_FORK
will be delivered to the userfaultfd monitor. will be delivered to the userfaultfd monitor.
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates the use of the userfaultfd mechanism. The program below demonstrates the use of the userfaultfd mechanism.
The program creates two threads, one of which acts as the The program creates two threads, one of which acts as the
page-fault handler for the process, for the pages in a demand-page zero page-fault handler for the process, for the pages in a demand-page zero

View File

@ -618,7 +618,7 @@ is NULL,
succeeds, and returns the process ID of the waited-for child. succeeds, and returns the process ID of the waited-for child.
Applications should avoid relying on this inconsistent, Applications should avoid relying on this inconsistent,
nonstandard, and unnecessary feature. nonstandard, and unnecessary feature.
.SH EXAMPLE .SH EXAMPLES
.\" fork.2 refers to this example program. .\" fork.2 refers to this example program.
The following program demonstrates the use of The following program demonstrates the use of
.BR fork (2) .BR fork (2)

View File

@ -312,7 +312,7 @@ and less efficient operation of the macros that
operate on dynamically allocated CPU sets. operate on dynamically allocated CPU sets.
These bugs are fixed in glibc 2.9. These bugs are fixed in glibc 2.9.
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7029 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=7029
.SH EXAMPLE .SH EXAMPLES
The following program demonstrates the use of some of the macros The following program demonstrates the use of some of the macros
used for dynamically allocated CPU sets. used for dynamically allocated CPU sets.
.PP .PP

View File

@ -63,7 +63,7 @@ has been provided since version 2.16 and
has been available since version 2.17. has been available since version 2.17.
.SH CONFORMING TO .SH CONFORMING TO
Both functions are nonstandard GNU extensions. Both functions are nonstandard GNU extensions.
.SH EXAMPLE .SH EXAMPLES
The following program will calculate the time, in microseconds, spent The following program will calculate the time, in microseconds, spent
between two calls to between two calls to
.BR __ppc_get_timebase (). .BR __ppc_get_timebase ().

View File

@ -48,7 +48,7 @@ and
macros from macros from
.I <fpu_control.h> .I <fpu_control.h>
can be used. can be used.
.SH EXAMPLE .SH EXAMPLES
.B __setfpucw(0x1372) .B __setfpucw(0x1372)
.PP .PP
Set FPU control word on the i386 architecture to Set FPU control word on the i386 architecture to

View File

@ -125,7 +125,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008. POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
See See
.BR aio (7). .BR aio (7).
.SH SEE ALSO .SH SEE ALSO

View File

@ -93,7 +93,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008. POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
See See
.BR aio (7). .BR aio (7).
.SH SEE ALSO .SH SEE ALSO

View File

@ -155,7 +155,7 @@ The memory areas involved must remain valid.
Simultaneous I/O operations specifying the same Simultaneous I/O operations specifying the same
.I aiocb .I aiocb
structure produce undefined results. structure produce undefined results.
.SH EXAMPLE .SH EXAMPLES
See See
.BR aio (7). .BR aio (7).
.SH SEE ALSO .SH SEE ALSO

View File

@ -89,7 +89,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008. POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
See See
.BR aio (7). .BR aio (7).
.SH SEE ALSO .SH SEE ALSO

View File

@ -143,7 +143,7 @@ Since glibc 2.2.3,
.BR on_exit (3)) .BR on_exit (3))
can be used within a shared library to establish functions can be used within a shared library to establish functions
that are called when the shared library is unloaded. that are called when the shared library is unloaded.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -196,7 +196,7 @@ For systems using the GNU linker, it is necessary to use the
linker option. linker option.
Note that names of "static" functions are not exposed, Note that names of "static" functions are not exposed,
and won't be available in the backtrace. and won't be available in the backtrace.
.SH EXAMPLE .SH EXAMPLES
The program below demonstrates the use of The program below demonstrates the use of
.BR backtrace () .BR backtrace ()
and and

View File

@ -178,7 +178,7 @@ Before glibc 2.2.1, the glibc version of
.BR dirname () .BR dirname ()
did not correctly handle pathnames with trailing \(aq/\(aq characters, did not correctly handle pathnames with trailing \(aq/\(aq characters,
and generated a segfault if given a NULL argument. and generated a segfault if given a NULL argument.
.SH EXAMPLE .SH EXAMPLES
The following code snippet demonstrates the use of The following code snippet demonstrates the use of
.BR basename () .BR basename ()
and and

View File

@ -89,7 +89,7 @@ T} Thread safety MT-Safe
.sp 1 .sp 1
.SH CONFORMING TO .SH CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD. POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
.SH EXAMPLE .SH EXAMPLES
The example below first sorts an array of structures using The example below first sorts an array of structures using
.BR qsort (3), .BR qsort (3),
then retrieves desired elements using then retrieves desired elements using

View File

@ -42,7 +42,7 @@ These macros return the value of their argument with the bytes reversed.
These macros always succeed. These macros always succeed.
.SH CONFORMING TO .SH CONFORMING TO
These macros are GNU extensions. These macros are GNU extensions.
.SH EXAMPLE .SH EXAMPLES
The program below swaps the bytes of the 8-byte integer supplied as The program below swaps the bytes of the 8-byte integer supplied as
its command-line argument. its command-line argument.
The following shell session demonstrates the use of the program: The following shell session demonstrates the use of the program:

View File

@ -49,7 +49,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. C99, POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
/* Link with "\-lm" */ /* Link with "\-lm" */

View File

@ -52,7 +52,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. C99, POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
/* Link with "\-lm" */ /* Link with "\-lm" */

View File

@ -47,7 +47,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. C99, POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
/* Link with "\-lm" */ /* Link with "\-lm" */

View File

@ -49,7 +49,7 @@ T} Thread safety MT-Safe
.TE .TE
.SH CONFORMING TO .SH CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. C99, POSIX.1-2001, POSIX.1-2008.
.SH EXAMPLE .SH EXAMPLES
.EX .EX
/* Link with "\-lm" */ /* Link with "\-lm" */

View File

@ -109,7 +109,7 @@ with a
of 0, of 0,
is the same as using the clock ID is the same as using the clock ID
.BR CLOCK_PROCESS_CPUTIME_ID . .BR CLOCK_PROCESS_CPUTIME_ID .
.SH EXAMPLE .SH EXAMPLES
The example program below obtains the The example program below obtains the
CPU-time clock ID of the process whose ID is given on the command line, CPU-time clock ID of the process whose ID is given on the command line,
and then uses and then uses

View File

@ -186,7 +186,7 @@ and
are constant expressions (assuming their argument is constant), are constant expressions (assuming their argument is constant),
meaning that these values can be used to declare the size of global variables. meaning that these values can be used to declare the size of global variables.
This may not be portable, however. This may not be portable, however.
.SH EXAMPLE .SH EXAMPLES
This code looks for the This code looks for the
.B IP_TTL .B IP_TTL
option in a received ancillary buffer: option in a received ancillary buffer:

Some files were not shown because too many files have changed in this diff Show More