While doing this global change, fix other minor issues found nearby.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
.P
.in +4n
.EX
-$ \fBiconv \-f ISO\-8859\-15 \-t UTF\-8 < input.txt > output.txt\fP
+.RB $ " iconv \-f ISO\-8859\-15 \-t UTF\-8 < input.txt > output.txt" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBecho abc ß α € à ḃç | iconv \-f UTF\-8 \-t ASCII//TRANSLIT\fP
+.RB $ " echo abc ß α € à ḃç | iconv \-f UTF\-8 \-t ASCII//TRANSLIT" ;
abc ss ? EUR abc
.EE
.in
.P
.in +4n
.EX
-$ \fBldd /bin/ls\fP
+.RB $ " ldd /bin/ls" ;
linux\-vdso.so.1 (0x00007ffcc3563000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f87e5254000)
.P
.in +4n
.EX
-$ \fBobjdump \-p /path/to/program | grep NEEDED\fP
+.RB $ " objdump \-p /path/to/program | grep NEEDED" ;
.EE
.in
.P
.B \-m
Display the available charmaps (character set description files).
To display the current character set for the locale, use
-\fBlocale \-c charmap\fR.
+.IR "locale\ \-c\ charmap" .
.P
The
.B locale
POSIX.1-2001.
.SH EXAMPLES
.EX
-$ \fBlocale\fP
+.RB $ " locale" ;
LANG=en_US.UTF\-8
LC_CTYPE="en_US.UTF\-8"
LC_NUMERIC="en_US.UTF\-8"
LC_IDENTIFICATION="en_US.UTF\-8"
LC_ALL=
.P
-$ \fBlocale date_fmt\fP
+.RB $ " locale date_fmt" ;
%a %b %e %H:%M:%S %Z %Y
.P
-$ \fBlocale \-k date_fmt\fP
+.RB $ " locale \-k date_fmt" ;
date_fmt="%a %b %e %H:%M:%S %Z %Y"
.P
-$ \fBlocale \-ck date_fmt\fP
+.RB $ " locale \-ck date_fmt" ;
LC_TIME
date_fmt="%a %b %e %H:%M:%S %Z %Y"
.P
-$ \fBlocale LC_TELEPHONE\fP
+.RB $ " locale LC_TELEPHONE" ;
+%c (%a) %l
(%a) %l
11
1
UTF\-8
.P
-$ \fBlocale \-k LC_TELEPHONE\fP
+.RB $ " locale \-k LC_TELEPHONE" ;
tel_int_fmt="+%c (%a) %l"
tel_dom_fmt="(%a) %l"
int_select="11"
subsequent user sessions:
.P
.EX
-$ \fBmkdir \-p $HOME/.locale\fP
-$ \fBI18NPATH=./wrk/ localedef \-f UTF\-8 \-i fi_SE $HOME/.locale/fi_SE.UTF\-8\fP
-$ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF\-8 date\fP
-$ \fBecho "export LOCPATH=\[rs]$HOME/.locale" >> $HOME/.bashrc\fP
-$ \fBecho "export LANG=fi_SE.UTF\-8" >> $HOME/.bashrc\fP
+.RB $ " mkdir \-p $HOME/.locale" ;
+.RB $ " I18NPATH=./wrk/ localedef \-f UTF\-8 \-i fi_SE $HOME/.locale/fi_SE.UTF\-8" ;
+.RB $ " LOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF\-8 date" ;
+.RB $ " echo \[dq]export LOCPATH=\[rs]$HOME/.locale\[dq] >> $HOME/.bashrc" ;
+.RB $ " echo \[dq]export LANG=fi_SE.UTF\-8\[dq] >> $HOME/.bashrc" ;
.EE
.SH SEE ALSO
.BR localedef (1),
is not the same as
.BR \-\-force .
.TP
-.BI \-f " charmapfile" "\fR, \fP\-\-charmap=" charmapfile
+.BI \-f\~ charmapfile
+.TQ
+.BI \-\-charmap= charmapfile
Specify the file that defines the character set
that is used by the input file.
If
The default directory for character maps is printed by
.BR "localedef \-\-help" .
.TP
-.BI \-i " inputfile" "\fR, \fP\-\-inputfile=" inputfile
+.BI \-i\~ inputfile
+.TQ
+.BI \-\-inputfile= inputfile
Specify the locale definition file to compile.
The file is sought in the current directory
and the default directory for locale definition files.
The default directory for locale definition files is printed by
.BR "localedef \-\-help" .
.TP
-.BI \-u " repertoirefile" "\fR, \fP\-\-repertoire\-map=" repertoirefile
+.BI \-u\~ repertoirefile
+.TQ
+.BI \-\-repertoire\-map= repertoirefile
Read mappings from symbolic names to Unicode code points from
.IR repertoirefile .
If
The default directory for repertoire maps is printed by
.BR "localedef \-\-help" .
.TP
-.BI \-A " aliasfile" "\fR, \fP\-\-alias\-file=" aliasfile
+.BI \-A\~ aliasfile
+.TQ
+.BI \-\-alias\-file= aliasfile
Use
.I aliasfile
to look up aliases for locale names.
contains three fields:
.RS 4
.TP
-\fBheap total\fR
-Sum of \fIsize\fR arguments of all
+.B heap total
+Sum of
+.I size
+arguments of all
.BR malloc (3)
calls,
-products of arguments (\fIn\fR*\fIsize\fR) of all
+products of arguments
+.RI ( n * size )
+of all
.BR calloc (3)
calls,
-and sum of \fIlength\fR arguments of all
+and sum of
+.I length
+arguments of all
.BR mmap (2)
calls.
In the case of
the sum of all such differences (new size minus old size) is added.
.TP
.B "heap peak"
-Maximum of all \fIsize\fR arguments of
+Maximum of all
+.I size
+arguments of
.BR malloc (3),
-all products of \fIn\fR*\fIsize\fR of
+all products of
+.IR n * size
+of
.BR calloc (3),
-all \fIsize\fR arguments of
+all
+.I size
+arguments of
.BR realloc (3),
.I length
arguments of
.BR mmap (2),
and
-\fInew_size\fR arguments of
+.I new_size
+arguments of
.BR mremap (2).
.TP
.B "stack peak"
allocations into various bucket sizes.
.SH OPTIONS
.TP
-.BI \-n\ name \fR,\ \fB\-\-progname= name
+.BI \-n\~ name
+.TQ
+.BI \-\-progname= name
Name of the program file to profile.
.TP
-.BI \-p\ file \fR,\ \fB\-\-png= file
+.BI \-p\~ file
+.TQ
+.BI \-\-png= file
Generate PNG graphic and store it in
.IR file .
.TP
-.BI \-d\ file \fR,\ \fB\-\-data= file
+.BI \-d\~ file
+.TQ
+.BI \-\-data= file
Generate binary data file and store it in
.IR file .
.TP
-.B \-u\fR,\ \fB\-\-unbuffered
+.B \-u
+.TQ
+.B \-\-unbuffered
Do not buffer output.
.TP
-.BI \-b\ size \fR,\ \fB\-\-buffer= size
+.BI \-b\~ size
+.TQ
+.BI \-\-buffer= size
Collect
.I size
entries before writing them out.
.RB ( SIGPROF )
sampling of stack pointer value.
.TP
-.B \-m\fR,\ \fB\-\-mmap
+.B \-m
+.TQ
+.B \-\-mmap
Also trace
.BR mmap (2),
.BR mremap (2),
and
.BR munmap (2).
.TP
-.B \-?\fR,\ \fB\-\-help
+.B \-?
+.TQ
+.B \-\-help
Print help and exit.
.TP
.B \-\-usage
Print a short usage message and exit.
.TP
-.B \-V\fR,\ \fB\-\-version
+.B \-V
+.TQ
+.B \-\-version
Print version information and exit.
.TP
The following options apply only when generating graphical output:
.TP
-.B \-t\fR,\ \fB\-\-time\-based
+.B \-t
+.TQ
+.B \-\-time\-based
Use time (rather than number of function calls) as the scale for the X axis.
.TP
-.B \-T\fR,\ \fB\-\-total
+.B \-T
+.TQ
+.B \-\-total
Also draw a graph of total memory use.
.TP
-.BI \fB\-\-title= name
+.BI \-\-title= name
Use
.I name
as the title of the graph.
.TP
-.BI \-x\ size \fR,\ \fB\-\-x\-size= size
+.BI \-x\~ size
+.TQ
+.BI \-\-x\-size= size
Make the graph
.I size
pixels wide.
.TP
-.BI \-y\ size \fR,\ \fB\-\-y\-size= size
+.BI \-y\~ size
+.TQ
+.BI \-\-y\-size= size
Make the graph
.I size
pixels high.
.P
.in +4n
.EX
-$ \fBmemusage \-\-data=memusage.dat ./a.out\fP
+.RB $ " memusage \-\-data=memusage.dat ./a.out" ;
\&...
Memory usage summary: heap total: 45200, heap peak: 6440, stack peak: 224
total calls total memory failed calls
5232\-5247 2 4% =================================
5840\-5855 2 4% =================================
6432\-6447 1 2% ================
-$ \fBmemusagestat memusage.dat memusage.png\fP
+.RB $ " memusagestat memusage.dat memusage.png" ;
.EE
.in
.SS Program source
time.
.SH OPTIONS
.TP
-.BI \-o\ file \fR,\ \fB\-\-output= file
+.BI \-o\~ file
+.TQ
+.BI \-\-output= file
Name of the output file.
.TP
-.BI \-s\ string \fR,\ \fB\-\-string= string
+.BI \-s\~ string
+.TQ
+.BI \-\-string= string
Use
.I string
as the title inside the output graph.
.TP
-.B \-t\fR,\ \fB\-\-time
+.B \-t
+.TQ
+.B \-\-time
Use time (rather than number of function calls) as the scale for the X axis.
.TP
-.B \-T\fR,\ \fB\-\-total
+.B \-T
+.TQ
+.B \-\-total
Also draw a graph of total memory consumption.
.TP
-.BI \-x\ size \fR,\ \fB\-\-x\-size= size
+.BI \-x\~ size
+.TQ
+.BI \-\-x\-size= size
Make the output graph
.I size
pixels wide.
.TP
-.BI \-y\ size \fR,\ \fB\-\-y\-size= size
+.BI \-y\~ size
+.TQ
+.BI \-\-y\-size= size
Make the output graph
.I size
pixels high.
.TP
-.B \-?\fR,\ \fB\-\-help
+.B \-?
+.TQ
+.B \-\-help
Print a help message and exit.
.TP
.B \-\-usage
Print a short usage message and exit.
.TP
-.B \-V\fR,\ \fB\-\-version
+.B \-V
+.TQ
+.B \-\-version
Print version information and exit.
.SH BUGS
To report bugs, see
.P
.in +4n
.EX
-$ \fBgdb \-ex "set confirm off" \-ex "set height 0" \-ex "info shared" \[rs]\fP
- \fB\-ex "quit" \-p $pid | grep \[aq]\[ha]0x.*0x\[aq]\fP
+.RB $ " gdb \-ex \[dq]set confirm off\[dq] \[rs]"
+.B " \-ex \[dq]set height 0\[dq] \[rs]"
+.B " \-ex \[dq]info shared\[dq] \[rs]"
+.B " \-ex \[dq]quit\[dq] \[rs]"
+.B " \-p $pid \[rs]"
+.BR "| grep \[aq]\[ha]0x.*0x\[aq]" ;
.EE
.in
.SH BUGS
to earlier glibc versions in some distributions.
.SH EXAMPLES
.EX
-$ \fBecho $$\fP # Display PID of shell
+.RB $ " echo $$" "; # Display PID of shell"
1143
-$ \fBpldd $$\fP # Display DSOs linked into the shell
+.RB $ " pldd $$" "; # Display DSOs linked into the shell"
1143: /usr/bin/bash
linux\-vdso.so.1
/lib64/libtinfo.so.5
.P
.in +4n
.EX
-$ \fBcat prog.c\fP
+.RB $ " cat prog.c" ;
#include <stdlib.h>
\&
void x1(void);
.P
.in +4n
.EX
-$ \fBcat libdemo.c\fP
+.RB $ " cat libdemo.c" ;
#include <unistd.h>
\&
void
.P
.in +4n
.EX
-$ \fBcc \-g \-fPIC \-shared \-Wl,\-soname,libdemo.so.1 \[rs]\fP
- \fB\-o libdemo.so.1.0.1 libdemo.c\fP
+.RB $ " cc \-g \-fPIC \-shared \-Wl,\-soname,libdemo.so.1 \[rs]"
+.BR " \-o libdemo.so.1.0.1 libdemo.c" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBln \-sf libdemo.so.1.0.1 libdemo.so.1\fP
-$ \fBln \-sf libdemo.so.1 libdemo.so\fP
+.RB $ " ln \-sf libdemo.so.1.0.1 libdemo.so.1" ;
+.RB $ " ln \-sf libdemo.so.1 libdemo.so" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBcc \-g \-o prog prog.c \-L. \-ldemo\fP
-$ \fBldd prog\fP
+.RB $ " cc \-g \-o prog prog.c \-L. \-ldemo" ;
+.RB $ " ldd prog" ;
linux\-vdso.so.1 => (0x00007fff86d66000)
libdemo.so.1 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007fd4dc138000)
.P
.in +4n
.EX
-$ \fBexport LD_PROFILE=libdemo.so.1\fP
+.RB $ " export LD_PROFILE=libdemo.so.1" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBexport LD_PROFILE_OUTPUT=$(pwd)/prof_data\fP
-$ \fBmkdir \-p $LD_PROFILE_OUTPUT\fP
+.RB $ " export LD_PROFILE_OUTPUT=$(pwd)/prof_data" ;
+.RB $ " mkdir \-p $LD_PROFILE_OUTPUT" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBrm \-f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile\fP
+.RB $ " rm \-f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBLD_LIBRARY_PATH=. ./prog\fP
-$ \fBls prof_data\fP
+.RB $ " LD_LIBRARY_PATH=. ./prog" ;
+.RB $ " ls prof_data" ;
libdemo.so.1.profile
.EE
.in
.P
.in +4n
.EX
-$ \fBsprof \-p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+.RB $ " sprof \-p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile" ;
Flat profile:
\&
Each sample counts as 0.01 seconds.
.P
.in +4n
.EX
-$ \fBsprof \-q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+.RB $ " sprof \-q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile" ;
\&
index % time self children called name
\&
.P
.in +4n
.EX
-$ \fBsprof \-c libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
+.RB $ " sprof \-c libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile" ;
<UNKNOWN> x1 1
x1 consumeCpu1 100
<UNKNOWN> x2 1
.SH VERSIONS
On Linux, the new socket returned by
.BR accept ()
-does \fInot\fP inherit file status flags such as
+does
+.I not
+inherit file status flags such as
.B O_NONBLOCK
and
.B O_ASYNC
.\" such as Linux libc4 and libc5, SunOS 4, SGI
the third argument of
.BR accept ()
-was declared as an \fIint\ *\fP.
+was declared as an
+.IR "int\ *" .
A POSIX.1g draft
-standard wanted to change it into a \fIsize_t\ *\fPC;
+standard wanted to change it into a
+.IR "size_t\ *" ;
.\" SunOS 5 has 'size_t *'
later POSIX standards and glibc 2.x have
.IR "socklen_t\ * ".
.P
.in +4n
.EX
-$ \fB./a.out user mykey "Some payload"\fP
+.RB $ " ./a.out user mykey \[dq]Some payload\[dq]" ;
Key ID is 64a4dca
-$ \fBgrep \[aq]64a4dca\[aq] /proc/keys\fP
+.RB $ " grep \[aq]64a4dca\[aq] /proc/keys" ;
064a4dca I\-\-Q\-\-\- 1 perm 3f010000 1000 1000 user mykey: 12
.EE
.in
.P
Various systems use various types for the argument of
.BR sbrk ().
-Common are \fIint\fP, \fIssize_t\fP, \fIptrdiff_t\fP, \fIintptr_t\fP.
+Common are
+.IR int ,
+.IR ssize_t ,
+.IR ptrdiff_t ,
+.IR intptr_t .
.\" One sees
-.\" \fIint\fP (e.g., XPGv4, DU 4.0, HP-UX 11, FreeBSD 4.0, OpenBSD 3.2),
-.\" \fIssize_t\fP (OSF1 2.0, Irix 5.3, 6.5),
-.\" \fIptrdiff_t\fP (libc4, libc5, ulibc, glibc 2.0, 2.1),
-.\" \fIintptr_t\fP (e.g., XPGv5, AIX, SunOS 5.8, 5.9, FreeBSD 4.7, NetBSD 1.6,
+.\" \f[I]int\f[] (e.g., XPGv4, DU 4.0, HP-UX 11, FreeBSD 4.0, OpenBSD 3.2),
+.\" \f[I]ssize_t\f[] (OSF1 2.0, Irix 5.3, 6.5),
+.\" \f[I]ptrdiff_t\f[] (libc4, libc5, ulibc, glibc 2.0, 2.1),
+.\" \f[I]intptr_t\f[] (e.g., XPGv5, AIX, SunOS 5.8, 5.9, FreeBSD 4.7, NetBSD 1.6,
.\" Tru64 5.1, glibc2.2).
.SS C library/kernel differences
The return value described above for
caller and
.BR init (1);
or a value less than \-1, in which case the change is applied
-to all members of the process group whose ID is \-\fIpid\fP.
+to all members of the process group whose ID is
+.IR \-pid .
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
.BR chroot ()
changes the root directory of the calling process to that specified in
.IR path .
-This directory will be used for pathnames beginning with \fI/\fP.
+This directory will be used for pathnames beginning with
+.IR / .
The root directory is inherited by all children of the calling process.
.P
Only a privileged process (Linux: one with the
moved out of it.
.P
This call does not change the current working directory,
-so that after the call \[aq]\fI.\fP\[aq] can
-be outside the tree rooted at \[aq]\fI/\fP\[aq].
+so that after the call
+.RI \[aq] . \[aq]
+can be outside the tree rooted at
+.RI \[aq] / \[aq].
In particular, the superuser can escape from a "chroot jail"
by doing:
.P
.IR clockid ,
and, if
.I res
-is non-NULL, stores it in the \fIstruct timespec\fP pointed to by
+is non-NULL, stores it in the
+.I struct\ timespec
+pointed to by
.IR res .
The resolution of clocks depends on the implementation and cannot be
configured by a particular process.
.P
On POSIX systems on which these functions are available, the symbol
.B _POSIX_TIMERS
-is defined in \fI<unistd.h>\fP to a value greater than 0.
+is defined in
+.I <unistd.h>
+to a value greater than 0.
POSIX.1-2008 makes these functions mandatory.
.P
The symbols
.P
.in +4n
.EX
-$ \fB./clock_times x\fP
+.RB $ " ./clock_times x" ;
CLOCK_REALTIME : 1585985459.446 (18356 days + 7h 30m 59s)
resolution: 0.000000001
CLOCK_TAI : 1585985496.447 (18356 days + 7h 31m 36s)
struct clone_args {
u64 flags; /* Flags bit mask */
u64 pidfd; /* Where to store PID file descriptor
- (\fIint *\fP) */
+ (\f[I]int *\f[]) */
u64 child_tid; /* Where to store child TID,
- in child\[aq]s memory (\fIpid_t *\fP) */
+ in child\[aq]s memory (\f[I]pid_t *\f[]) */
u64 parent_tid; /* Where to store child TID,
- in parent\[aq]s memory (\fIpid_t *\fP) */
+ in parent\[aq]s memory (\f[I]pid_t *\f[]) */
u64 exit_signal; /* Signal to deliver to parent on
child termination */
u64 stack; /* Pointer to lowest byte of stack */
u64 stack_size; /* Size of stack */
u64 tls; /* Location of new TLS */
- u64 set_tid; /* Pointer to a \fIpid_t\fP array
+ u64 set_tid; /* Pointer to a \f[I]pid_t\f[] array
(since Linux 5.5) */
- u64 set_tid_size; /* Number of elements in \fIset_tid\fP
+ u64 set_tid_size; /* Number of elements in \f[I]set_tid\f[]
(since Linux 5.5) */
u64 cgroup; /* File descriptor for target cgroup
of child (since Linux 5.7) */
l l l
li li l.
clone() clone3() Notes
- \fIcl_args\fP field
+ \f[I]cl_args\f[] field
flags & \[ti]0xff flags T{
For most flags; details below
T}
parent_tid parent_tid See CLONE_PARENT_SETTID
flags & 0xff exit_signal
stack stack
-\fP---\fP stack_size
+\f[R]---\f[] stack_size
tls tls See CLONE_SETTLS
-\fP---\fP set_tid See below for details
-\fP---\fP set_tid_size
-\fP---\fP cgroup See CLONE_INTO_CGROUP
+\f[R]---\f[] set_tid See below for details
+\f[R]---\f[] set_tid_size
+\f[R]---\f[] cgroup See CLONE_INTO_CGROUP
.TE
.RE
.\"
.BR CLONE_NEWPID ,
or
.B CLONE_NEWUTS
-was specified by an unprivileged process (process without \fBCAP_SYS_ADMIN\fP).
+was specified by an unprivileged process (process without
+.BR CAP_SYS_ADMIN ).
.TP
.B EPERM
.B CLONE_PID
.in +4n
.EX
.BI "long clone(unsigned long " flags ", void *" stack ,
-.BI " int " stack_size , "\fR /* Size of stack */"
+.BI " int " stack_size , "\f[R] /* Size of stack */\f[]"
.BI " int *" parent_tid ", int *" child_tid ,
.BI " unsigned long " tls );
.EE
.BI "int __clone2(typeof(int (void *)) *" fn ,
.BI " void *" stack_base ", size_t " stack_size ,
.BI " int " flags ", void *" "arg" ", ..."
-.BI " \fR/*\fP pid_t *" parent_tid ", struct user_desc *" tls ,
-.BI " pid_t *" child_tid " \fR*/\fP );"
+.BI " \f[R]/*\f[] pid_t *" parent_tid ", struct user_desc *" tls ,
+.BI " pid_t *" child_tid " \f[R]*/\f[] );"
.EE
.in
.P
.in +4n
.EX
.BI "long clone2(unsigned long " flags ", void *" stack_base ,
-.BI " int " stack_size , "\fR /* Size of stack */"
+.BI " int " stack_size , "\f[R] /* Size of stack */\f[]"
.BI " int *" parent_tid ", int *" child_tid ,
.BI " unsigned long " tls );
.EE
.BR close (2)
calls entirely;
the whole operation is complete once the table is unshared.
-.SS Closing files on \fBexec\fP
+.SS Closing files on \f[I]exec\f[]
.\" 582f1fb6b721facf04848d2ca57f34468da1813e
This is particularly useful in cases where multiple
.RB pre- exec
.P
.in +4n
.EX
-$ \fBtouch /tmp/a /tmp/b /tmp/c\fP
-$ \fB./a.out /tmp/a /tmp/b /tmp/c\fP
+.RB $ " touch /tmp/a /tmp/b /tmp/c" ;
+.RB $ " ./a.out /tmp/a /tmp/b /tmp/c" ;
/tmp/a opened as FD 3
/tmp/b opened as FD 4
/tmp/c opened as FD 5
.fi
.SH DESCRIPTION
.BR execve ()
-executes the program referred to by \fIpathname\fP.
+executes the program referred to by
+.IR pathname .
This causes the program that is currently being run by the calling process
to be replaced with a new program, with newly initialized stack, heap,
and (initialized and uninitialized) data segments.
.P
-\fIpathname\fP must be either a binary executable, or a script
+.I pathname
+must be either a binary executable, or a script
starting with a line of the form:
.P
.in +4n
.EX
-\fB#!\fP\fIinterpreter \fP[optional-arg]
+.SY #!\f[I]interpreter\f[]
+.RI [ optional-arg ]
+.YS
.EE
.in
.P
uninitialized data (bss), and stack of the calling process are overwritten
according to the contents of the newly loaded program.
.P
-If the current program is being ptraced, a \fBSIGTRAP\fP signal is sent to it
+If the current program is being ptraced, a
+.B SIGTRAP
+signal is sent to it
after a successful
.BR execve ().
.P
If the set-user-ID bit is set on the program file referred to by
-\fIpathname\fP,
+.IR pathname ,
then the effective user ID of the calling process is changed
to that of the owner of the program file.
Similarly, if the set-group-ID bit is set on the program file,
.BR execve ().
Mutexes, condition variables, and other pthreads objects are not preserved.
.IP \[bu]
-The equivalent of \fIsetlocale(LC_ALL, "C")\fP
+The equivalent of
+.I setlocale(LC_ALL,\ \[dq]C\[dq])
is executed at program start-up.
.IP \[bu]
POSIX.1 specifies that the dispositions of any signals that
permission enabled and whose first line is of the form:
.P
.in +4n
-.EX
-\fB#!\fP\fIinterpreter \fP[optional-arg]
-.EE
+.SY #!\f[I]interpreter\f[]
+.RI [ optional-arg ]
+.YS
.in
.P
The
will be invoked with the following arguments:
.P
.in +4n
-.EX
-\fIinterpreter\fP [optional-arg] \fIpathname\fP arg...
-.EE
+.SY \f[I]interpreter\f[]
+.RI [ optional-arg ]
+.I pathname
+.IR arg ...
+.YS
.in
.P
where
.I mode
is
.BR FALLOC_FL_INSERT_RANGE ,
-and the current file size+\fIlen\fP exceeds the maximum file size.
+and the current file
+.RI size+ len
+exceeds the maximum file size.
.TP
.B EINTR
A signal was caught during execution; see
indicating that the kernel does not recognize this value.
.SS Duplicating a file descriptor
.TP
-.BR F_DUPFD " (\fIint\fP)"
+.BR F_DUPFD \~(\f[I]int\f[])
Duplicate the file descriptor
.I fd
using the lowest-numbered available file descriptor greater than or equal to
.BR dup (2)
for further details.
.TP
-.BR F_DUPFD_CLOEXEC " (\fIint\fP; since Linux 2.6.24)"
+.BR F_DUPFD_CLOEXEC "\~(\f[I]int\f[]; since Linux 2.6.24)"
As for
.BR F_DUPFD ,
but additionally set the
bit is not set, the file descriptor will remain open across an
.BR execve (2).
.TP
-.BR F_GETFD " (\fIvoid\fP)"
+.BR F_GETFD \~(\f[I]void\f[])
Return (as the function result) the file descriptor flags;
.I arg
is ignored.
.TP
-.BR F_SETFD " (\fIint\fP)"
+.BR F_SETFD \~(\f[I]int\f[])
Set the file descriptor flags to the value specified by
.IR arg .
.P
The file status flags and their semantics are described in
.BR open (2).
.TP
-.BR F_GETFL " (\fIvoid\fP)"
+.BR F_GETFL \~(\f[I]void\f[])
Return (as the function result)
the file access mode and the file status flags;
.I arg
is ignored.
.TP
-.BR F_SETFL " (\fIint\fP)"
+.BR F_SETFL \~(\f[I]int\f[])
Set the file status flags to the value specified by
.IR arg .
File access mode
an existing lock if the byte range specified by the new lock does not
precisely coincide with the range of the existing lock.)
.TP
-.BR F_SETLK " (\fIstruct flock *\fP)"
+.BR F_SETLK \~(\f[I]struct\~flock\~*\f[])
Acquire a lock (when
.I l_type
is
(The error returned in this case differs across implementations,
so POSIX requires a portable application to check for both errors.)
.TP
-.BR F_SETLKW " (\fIstruct flock *\fP)"
+.BR F_SETLKW \~(\f[I]struct\~flock\~*\f[])
As for
.BR F_SETLK ,
but if a conflicting lock is held on the file, then wait for that
see
.BR signal (7)).
.TP
-.BR F_GETLK " (\fIstruct flock *\fP)"
+.BR F_GETLK \~(\f[I]struct\~flock\~*\f[])
On input to this call,
.I lock
describes a lock we would like to place on the file.
The operations for working with open file description locks are analogous
to those used with traditional locks:
.TP
-.BR F_OFD_SETLK " (\fIstruct flock *\fP)"
+.BR F_OFD_SETLK \~(\f[I]struct\~flock\~*\f[])
Acquire an open file description lock (when
.I l_type
is
to
.BR EAGAIN .
.TP
-.BR F_OFD_SETLKW " (\fIstruct flock *\fP)"
+.BR F_OFD_SETLKW \~(\f[I]struct\~flock\~*\f[])
As for
.BR F_OFD_SETLK ,
but if a conflicting lock is held on the file, then wait for that lock to be
see
.BR signal (7)).
.TP
-.BR F_OFD_GETLK " (\fIstruct flock *\fP)"
+.BR F_OFD_GETLK \~(\f[I]struct\~flock\~*\f[])
On input to this call,
.I lock
describes an open file description lock we would like to place on the file.
.B F_SETSIG
are used to manage I/O availability signals:
.TP
-.BR F_GETOWN " (\fIvoid\fP)"
+.BR F_GETOWN \~(\f[I]void\f[])
Return (as the function result)
the process ID or process group ID currently receiving
.B SIGIO
.I arg
is ignored.
.TP
-.BR F_SETOWN " (\fIint\fP)"
+.BR F_SETOWN \~(\f[I]int\f[])
Set the process ID or process group ID that will receive
.B SIGIO
and
.B SIGURG
signals at a particular thread.
.TP
-.BR F_GETOWN_EX " (\fIstruct f_owner_ex *\fP) (since Linux 2.6.32)"
+.BR F_GETOWN_EX "\~(\f[I]struct\~f_owner_ex\~*\f[]; since Linux 2.6.32)"
Return the current file descriptor owner settings
as defined by a previous
.B F_SETOWN_EX
.B F_SETOWN_EX
for more details.
.TP
-.BR F_SETOWN_EX " (\fIstruct f_owner_ex *\fP) (since Linux 2.6.32)"
+.BR F_SETOWN_EX "\~(\f[I]struct\~f_owner_ex\~*\f[]; since Linux 2.6.32)"
This operation performs a similar task to
.BR F_SETOWN .
It allows the caller to direct I/O availability signals
a process group ID is specified as a positive value here.)
.RE
.TP
-.BR F_GETSIG " (\fIvoid\fP)"
+.BR F_GETSIG \~(\f[I]void\f[])
Return (as the function result)
the signal sent when input or output becomes possible.
A value of zero means
.I arg
is ignored.
.TP
-.BR F_SETSIG " (\fIint\fP)"
+.BR F_SETSIG \~(\f[I]int\f[])
Set the signal sent when input or output becomes possible
to the value given in
.IR arg .
.BR truncate (2)
the file referred to by that file descriptor.
.TP
-.BR F_SETLEASE " (\fIint\fP)"
+.BR F_SETLEASE \~(\f[I]int\f[])
Set or remove a file lease according to which of the following
values is specified in the integer
.IR arg :
.B CAP_LEASE
capability may take out leases on arbitrary files.
.TP
-.BR F_GETLEASE " (\fIvoid\fP)"
+.BR F_GETLEASE \~(\f[I]void\f[])
Indicates what type of lease is associated with the file descriptor
.I fd
by returning either
(This is useful if the caller holds leases against multiple files.)
.SS File and directory change notification (dnotify)
.TP
-.BR F_NOTIFY " (\fIint\fP)"
+.BR F_NOTIFY \~(\f[I]int\f[])
(Linux 2.4 onward)
Provide notification when the directory referred to by
.I fd
.BR inotify (7).
.SS Changing the capacity of a pipe
.TP
-.BR F_SETPIPE_SZ " (\fIint\fP; since Linux 2.6.35)"
+.BR F_SETPIPE_SZ "\~(\f[I]int\f[]; since Linux 2.6.35)"
Change the capacity of the pipe referred to by
.I fd
to be at least
the number of bytes that can be written may be less than the nominal size,
depending on the size of the writes.
.TP
-.BR F_GETPIPE_SZ " (\fIvoid\fP; since Linux 2.6.35)"
+.BR F_GETPIPE_SZ "\~(\f[I]void\f[]; since Linux 2.6.35)"
Return (as the function result) the capacity of the pipe referred to by
.IR fd .
.\"
the same set of seals.
Furthermore, seals can never be removed, only added.
.TP
-.BR F_ADD_SEALS " (\fIint\fP; since Linux 3.17)"
+.BR F_ADD_SEALS "\~(\f[I]int\f[]; since Linux 3.17)"
Add the seals given in the bit-mask argument
.I arg
to the set of seals of the inode referred to by the file descriptor
.I fd
must be writable.
.TP
-.BR F_GET_SEALS " (\fIvoid\fP; since Linux 3.17)"
+.BR F_GET_SEALS "\~(\f[I]void\f[]; since Linux 3.17)"
Return (as the function result) the current set of seals
of the inode referred to by
.IR fd .
The following operations can be applied to the file descriptor,
.IR fd :
.TP
-.BR F_GET_RW_HINT " (\fIuint64_t *\fP; since Linux 4.13)"
+.BR F_GET_RW_HINT "\~(\f[I]uint64_t\~*\f[]; since Linux 4.13)"
Returns the value of the read/write hint associated with the underlying inode
referred to by
.IR fd .
.TP
-.BR F_SET_RW_HINT " (\fIuint64_t *\fP; since Linux 4.13)"
+.BR F_SET_RW_HINT "\~(\f[I]uint64_t\~*\f[]; since Linux 4.13)"
Sets the read/write hint value associated with the
underlying inode referred to by
.IR fd .
This hint persists until either it is explicitly modified or
the underlying filesystem is unmounted.
.TP
-.BR F_GET_FILE_RW_HINT " (\fIuint64_t *\fP; since Linux 4.13)"
+.BR F_GET_FILE_RW_HINT "\~(\f[I]uint64_t\~*\f[]; since Linux 4.13)"
Returns the value of the read/write hint associated with
the open file description referred to by
.IR fd .
.TP
-.BR F_SET_FILE_RW_HINT " (\fIuint64_t *\fP; since Linux 4.13)"
+.BR F_SET_FILE_RW_HINT "\~(\f[I]uint64_t\~*\f[]; since Linux 4.13)"
Sets the read/write hint value associated with the open file description
referred to by
.IR fd .
.P
.BI "long syscall(SYS_futex, uint32_t *" uaddr ", int " futex_op \
", uint32_t " val ,
-.BI " const struct timespec *" timeout , \
-" \fR /* or: \fBuint32_t \fIval2\fP */"
+.BI " const struct timespec *" timeout \
+", \f[R]/* or:\f[] uint32_t " val2 " \f[R]*/\f[]"
.BI " uint32_t *" uaddr2 ", uint32_t " val3 );
.fi
.P
.in +4n
.EX
uint32_t oldval = *(uint32_t *) uaddr2;
-*(uint32_t *) uaddr2 = oldval \fIop\fP \fIoparg\fP;
+*(uint32_t *) uaddr2 = oldval \f[I]op\f[] \f[I]oparg\f[];
futex(uaddr, FUTEX_WAKE, val, 0, 0, 0);
-if (oldval \fIcmp\fP \fIcmparg\fP)
+if (oldval \f[I]cmp\f[] \f[I]cmparg\f[])
futex(uaddr2, FUTEX_WAKE, val2, 0, 0, 0);
.EE
.in
.P
.in +4n
.EX
-$ \fB./futex_demo\fP
+.RB $ " ./futex_demo" ;
Parent (18534) 0
Child (18535) 0
Parent (18534) 1
.I Documentation/robust\-futex\-ABI.txt
.P
Franke, H., Russell, R., and Kirwood, M., 2002.
-\fIFuss, Futexes and Furwocks: Fast Userlevel Locking in Linux\fP
-(from proceedings of the Ottawa Linux Symposium 2002),
.br
-.UR http://kernel.org\:/doc\:/ols\:/2002\:/ols2002\-pages\-479\-495.pdf
+.UR http://kernel.org/\:doc/\:ols/\:2002/\:ols2002\-pages\-479\-495.pdf
+.I Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux
.UE
+(from proceedings of the Ottawa Linux Symposium 2002).
.P
-Hart, D., 2009. \fIA futex overview and update\fP,
-.UR http://lwn.net/Articles/360699/
-.UE
+Hart, D., 2009.
+.UR http://lwn.net/\:Articles/\:360699/
+.I A futex overview and update
+.UE .
.P
Hart, D.\& and Guniguntala, D., 2009.
-\fIRequeue-PI: Making glibc Condvars PI-Aware\fP
-(from proceedings of the 2009 Real-Time Linux Workshop),
-.UR http://lwn.net/images/conf/rtlws11/papers/proc/p10.pdf
+.UR http://lwn.net/\:images/\:conf/\:rtlws11/\:papers/\:proc/\:p10.pdf
+.I Requeue-PI: Making glibc Condvars PI-Aware
.UE
+(from proceedings of the 2009 Real-Time Linux Workshop).
.P
-Drepper, U., 2011. \fIFutexes Are Tricky\fP,
-.UR http://www.akkadia.org/drepper/futex.pdf
-.UE
+Drepper, U., 2011.
+.UR http://www.akkadia.org/\:drepper/\:futex.pdf
+.I Futexes Are Tricky
+.UE .
.P
-Futex example library, futex\-*.tar.bz2 at
-.br
-.UR https://mirrors.kernel.org\:/pub\:/linux\:/kernel\:/people\:/rusty/
-.UE
+Futex example library,
+.UR https://mirrors.kernel.org/\:pub/\:linux/\:kernel/\:people/\:rusty/
+futex\-*.tar.bz2
+.UE .
.\"
.\" FIXME(Torvald) We should probably refer to the glibc code here, in
.\" particular the glibc-internal futex wrapper functions that are
struct linux_dirent {
unsigned long d_ino; /* Inode number */
unsigned long d_off; /* Not an offset; see below */
- unsigned short d_reclen; /* Length of this \fIlinux_dirent\fP */
+ unsigned short d_reclen; /* Length of this \f[I]linux_dirent\f[] */
char d_name[]; /* Filename (null\-terminated) */
/* length is actually (d_reclen \- 2 \-
offsetof(struct linux_dirent, d_name)) */
which has a size of
.I size
bytes.
-If the null-terminated domain name requires more than \fIlen\fP bytes,
+If the null-terminated domain name requires more than
+.I len
+bytes,
.BR getdomainname ()
-returns the first \fIlen\fP bytes (glibc) or gives an error (libc).
+returns the first
+.I len
+bytes (glibc) or gives an error (libc).
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
all System\ V-like systems.
Linux kernels before Linux 2.6.12 required the real or
effective user ID of the caller to match
-the real user of the process \fIwho\fP (instead of its effective user ID).
+the real user of the process
+.I who
+(instead of its effective user ID).
Linux 2.6.12 and later require
the effective user ID of the caller to match
-the real or effective user ID of the process \fIwho\fP.
+the real or effective user ID of the process
+.IR who .
All BSD-like systems (SunOS 4.1.3, Ultrix 4.2,
4.3BSD, FreeBSD 4.3, OpenBSD-2.5, ...) behave in the same
manner as Linux 2.6.12 and later.
that kills the process if no alternate stack
has been made available via
.BR sigaltstack (2)).
-Since the value is a \fIlong\fP, on machines with a 32-bit \fIlong\fP
+Since the value is a
+.IR long ,
+on machines with a 32-bit
+.I long
either this limit is at most 2\ GiB, or this resource is unlimited.
.TP
.B RLIMIT_CORE
returns the session ID of the calling process.
.SH RETURN VALUE
On success, a session ID is returned.
-On error, \fI(pid_t)\ \-1\fP is returned, and
+On error,
+.I (pid_t)\ \-1
+is returned, and
.I errno
is set to indicate the error.
.SH ERRORS
.P
.in +4n
.EX
-\fBDST_NONE\fP /* not on DST */
-\fBDST_USA\fP /* USA style DST */
-\fBDST_AUST\fP /* Australian style DST */
-\fBDST_WET\fP /* Western European DST */
-\fBDST_MET\fP /* Middle European DST */
-\fBDST_EET\fP /* Eastern European DST */
-\fBDST_CAN\fP /* Canada */
-\fBDST_GB\fP /* Great Britain and Eire */
-\fBDST_RUM\fP /* Romania */
-\fBDST_TUR\fP /* Turkey */
-\fBDST_AUSTALT\fP /* Australian style with shift in 1986 */
+\f[B]DST_NONE\f[] /* not on DST */
+\f[B]DST_USA\f[] /* USA style DST */
+\f[B]DST_AUST\f[] /* Australian style DST */
+\f[B]DST_WET\f[] /* Western European DST */
+\f[B]DST_MET\f[] /* Middle European DST */
+\f[B]DST_EET\f[] /* Eastern European DST */
+\f[B]DST_CAN\f[] /* Canada */
+\f[B]DST_GB\f[] /* Great Britain and Eire */
+\f[B]DST_RUM\f[] /* Romania */
+\f[B]DST_TUR\f[] /* Turkey */
+\f[B]DST_AUSTALT\f[] /* Australian style with shift in 1986 */
.EE
.in
.P
.SH ERRORS
.TP
.B EAGAIN
-The \fIiocb\fP specified was not canceled.
+The
+.I iocb
+specified was not canceled.
.TP
.B EFAULT
One of the data structures points to invalid data.
.TP
.B EINVAL
-The AIO context specified by \fIctx_id\fP is invalid.
+The AIO context specified by
+.I ctx_id
+is invalid.
.TP
.B ENOSYS
.BR io_cancel ()
The context pointed to is invalid.
.TP
.B EINVAL
-The AIO context specified by \fIctx_id\fP is invalid.
+The AIO context specified by
+.I ctx_id
+is invalid.
.TP
.B ENOSYS
.BR io_destroy ()
The
.BR io_getevents ()
system call
-attempts to read at least \fImin_nr\fP events and
-up to \fInr\fP events from the completion queue of the AIO context
-specified by \fIctx_id\fP.
+attempts to read at least
+.I min_nr
+events and
+up to
+.I nr
+events from the completion queue of the AIO context
+specified by
+.IR ctx_id .
.P
-The \fItimeout\fP argument specifies the amount of time to wait for events,
+The
+.I timeout
+argument specifies the amount of time to wait for events,
and is specified as a relative timeout in a
.BR timespec (3)
structure.
.SH ERRORS
.TP
.B EFAULT
-Either \fIevents\fP or \fItimeout\fP is an invalid pointer.
+Either
+.I events
+or
+.I timeout
+is an invalid pointer.
.TP
.B EINTR
Interrupted by a signal handler; see
.BR signal (7).
.TP
.B EINVAL
-\fIctx_id\fP is invalid.
-\fImin_nr\fP is out of range or \fInr\fP is
-out of range.
+.I ctx_id
+is invalid.
+.I min_nr
+is out of range or
+.I nr
+is out of range.
.TP
.B ENOSYS
.BR io_getevents ()
.BR io_setup ()
system call
creates an asynchronous I/O context suitable for concurrently processing
-\fInr_events\fP operations.
+.I nr_events
+operations.
The
.I ctx_idp
argument must not point to an AIO context that already exists, and must
be initialized to 0 prior to the call.
-On successful creation of the AIO context, \fI*ctx_idp\fP is filled in
+On successful creation of the AIO context,
+.I *ctx_idp
+is filled in
with the resulting handle.
.SH RETURN VALUE
On success,
.SH ERRORS
.TP
.B EAGAIN
-The specified \fInr_events\fP exceeds the limit of available events,
+The specified
+.I nr_events
+exceeds the limit of available events,
as defined in
.I /proc/sys/fs/aio\-max\-nr
(see
.BR proc (5)).
.TP
.B EFAULT
-An invalid pointer is passed for \fIctx_idp\fP.
+An invalid pointer is passed for
+.IR ctx_idp .
.TP
.B EINVAL
-\fIctx_idp\fP is not initialized, or the specified \fInr_events\fP
+.I ctx_idp
+is not initialized,
+or the specified
+.I nr_events
exceeds internal limits.
-\fInr_events\fP should be greater than 0.
+.I nr_events
+should be greater than 0.
.TP
.B ENOMEM
Insufficient kernel resources are available.
The
.BR io_submit ()
system call
-queues \fInr\fP I/O request blocks for processing in
-the AIO context \fIctx_id\fP.
+queues
+.I nr
+I/O request blocks for processing in
+the AIO context
+.IR ctx_id .
The
.I iocbpp
-argument should be an array of \fInr\fP AIO control blocks,
-which will be submitted to context \fIctx_id\fP.
+argument should be an array of
+.I nr
+AIO control blocks,
+which will be submitted to context
+.IR ctx_id .
.P
The
.I iocb
.SH RETURN VALUE
On success,
.BR io_submit ()
-returns the number of \fIiocb\fPs submitted (which may be
-less than \fInr\fP, or 0 if \fInr\fP is zero).
+returns the number of
+.IR iocb s
+submitted
+(which may be
+less than
+.IR nr ,
+or 0 if
+.I nr
+is zero).
For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
-Insufficient resources are available to queue any \fIiocb\fPs.
+Insufficient resources are available to queue any
+.IR iocb s.
.TP
.B EBADF
-The file descriptor specified in the first \fIiocb\fP is invalid.
+The file descriptor specified in the first
+.I iocb
+is invalid.
.TP
.B EFAULT
One of the data structures points to invalid data.
.TP
.B EINVAL
-The AIO context specified by \fIctx_id\fP is invalid.
-\fInr\fP is less than 0.
-The \fIiocb\fP at
+The AIO context specified by
+.I ctx_id
+is invalid.
+.I nr
+is less than 0.
+The
+.I iocb
+at
.I *iocbpp[0]
is not properly initialized, the operation specified is invalid for the file
-descriptor in the \fIiocb\fP, or the value in the
+descriptor in the
+.IR iocb ,
+or the value in the
.I aio_reqprio
field is invalid.
.TP
character.
Only the first
.I N
-of them are used for an 8x\fIN\fP font
+of them are used for an
+.RI 8x N
+font
(0 <
.I N
<= 32).
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
Parent PID is 1144
Parent opened file on FD 3
\&
.P
.in +4n
.EX
-$ \fBcc \-o key_instantiate key_instantiate.c \-lkeyutils\fP
-$ \fBsudo mv /sbin/request\-key /sbin/request\-key.backup\fP
-$ \fBsudo cp key_instantiate /sbin/request\-key\fP
-$ \fB./t_request_key user mykey somepayloaddata\fP
+.RB $ " cc \-o key_instantiate key_instantiate.c \-lkeyutils" ;
+.RB $ " sudo mv /sbin/request\-key /sbin/request\-key.backup" ;
+.RB $ " sudo cp key_instantiate /sbin/request\-key" ;
+.RB $ " ./t_request_key user mykey somepayloaddata" ;
Key ID is 20d035bf
-$ \fBsudo mv /sbin/request\-key.backup /sbin/request\-key\fP
+.RB $ " sudo mv /sbin/request\-key.backup /sbin/request\-key" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBcat /tmp/key_instantiate.log\fP
+.RB $ " cat /tmp/key_instantiate.log" ;
Time: Mon Nov 7 13:06:47 2016
\&
Command line arguments:
.P
.in +4n
.EX
-$ \fBcat /proc/keys | egrep \[aq]mykey|256e6a6\[aq]\fP
+.RB $ " cat /proc/keys | egrep \[aq]mykey|256e6a6\[aq]" ;
0256e6a6 I\-\-Q\-\-\- 194 perm 3f030000 1000 1000 keyring _ses: 3
20d035bf I\-\-Q\-\-\- 1 perm 3f010000 1000 1000 user mykey: 16
.EE
system call
can be used to send any signal to any process group or process.
.P
-If \fIpid\fP is positive, then signal \fIsig\fP is sent to the
-process with the ID specified by \fIpid\fP.
+If
+.I pid
+is positive,
+then signal
+.I sig
+is sent to
+the process with the ID specified by
+.IR pid .
.P
-If \fIpid\fP equals 0, then \fIsig\fP is sent to every process in the
-process group of the calling process.
+If
+.I pid
+equals 0,
+then
+.I sig
+is sent to
+every process in
+the process group of the calling process.
.P
-If \fIpid\fP equals \-1, then \fIsig\fP is sent to every process
-for which the calling process has permission to send signals,
-except for process 1 (\fIinit\fP), but see below.
+If
+.I pid
+equals \-1,
+then
+.I sig
+is sent to
+every process for which
+the calling process has permission to send signals,
+except for process 1
+.RI ( init ),
+but see below.
.P
-If \fIpid\fP is less than \-1, then \fIsig\fP is sent to every process
-in the process group whose ID is \fI\-pid\fP.
+If
+.I pid
+is less than \-1,
+then
+.I sig
+is sent to
+every process in
+the process group whose ID is
+.IR \-pid .
.P
-If \fIsig\fP is 0, then no signal is sent,
+If
+.I sig
+is 0,
+then no signal is sent,
but existence and permission checks are still performed;
-this can be used to check for the existence of a process ID or
-process group ID that the caller is permitted to signal.
+this can be used to
+check for the existence of
+a process ID or process group ID that the caller is permitted to signal.
.P
For a process to have permission to send a signal,
it must either be privileged (under Linux: have the
This is done to assure the
system is not brought down accidentally.
.P
-POSIX.1 requires that \fIkill(\-1,sig)\fP send \fIsig\fP
+POSIX.1 requires that
+.I kill(\-1,sig)
+send
+.I sig
to all processes that the calling process may send signals to,
except possibly for some implementation-defined system processes.
-Linux allows a process to signal itself, but on Linux the call
-\fIkill(\-1,sig)\fP does not signal the calling process.
+Linux allows a process to signal itself,
+but on Linux the call
+.I kill(\-1,sig)
+does not signal the calling process.
.P
POSIX.1 requires that if a process sends a signal to itself,
and the sending thread does not have the signal blocked,
.BR kill ()
failed with the error
.B EPERM
-if the caller did not have permission to send the signal to \fIany\fP (rather
-than \fIall\fP) of the members of the process group.
+if the caller did not have permission to send the signal to
+.I any
+(rather than
+.IR all )
+of the members of the process group.
Notwithstanding this error return, the signal was still delivered
to all of the processes for which the caller had permission to signal.
.SH SEE ALSO
.SS Example output
.in +4n
.EX
-$ \fBtouch /tmp/foo\fP
-$ \fBsetfattr \-n user.fred \-v chocolate /tmp/foo\fP
-$ \fBsetfattr \-n user.frieda \-v bar /tmp/foo\fP
-$ \fBsetfattr \-n user.empty /tmp/foo\fP
-$ \fB./listxattr /tmp/foo\fP
+.RB $ " touch /tmp/foo" ;
+.RB $ " setfattr \-n user.fred \-v chocolate /tmp/foo" ;
+.RB $ " setfattr \-n user.frieda \-v bar /tmp/foo" ;
+.RB $ " setfattr \-n user.empty /tmp/foo" ;
+.RB $ " ./listxattr /tmp/foo" ;
user.fred: chocolate
user.frieda: bar
user.empty: <no value>
.BR lseek ()
returns the resulting offset location as measured in bytes from the
beginning of the file.
-On error, the value \fI(off_t)\ \-1\fP is returned and
+On error, the value
+.I (off_t)\ \-1
+is returned and
.I errno
is set to indicate the error.
.SH ERRORS
.P
.in +4n
.EX
-$ \fB./t_memfd_create my_memfd_file 4096 sw &\fP
+.RB $ " ./t_memfd_create my_memfd_file 4096 sw &"
[1] 11775
PID: 11775; fd: 3; /proc/11775/fd/3
.EE
.P
.in +4n
.EX
-$ \fBreadlink /proc/11775/fd/3\fP
+.RB $ " readlink /proc/11775/fd/3" ;
/memfd:my_memfd_file (deleted)
-$ \fB./t_get_seals /proc/11775/fd/3\fP
+.RB $ " ./t_get_seals /proc/11775/fd/3" ;
Existing seals: WRITE SHRINK
.EE
.in
.TP
.B EINVAL
.RB ( mlock2 ())
-Unknown \fIflags\fP were specified.
+Unknown
+.I flags
+were specified.
.TP
.B EINVAL
.RB ( mlockall ())
-Unknown \fIflags\fP were specified or
+Unknown
+.I flags
+were specified or
.B MCL_ONFAULT
was specified without either
.B MCL_FUTURE
.BR munlock ()
are available,
.B _POSIX_MEMLOCK_RANGE
-is defined in \fI<unistd.h>\fP and the number of bytes in a page
+is defined in
+.I <unistd.h>
+and the number of bytes in a page
can be determined from the constant
.B PAGESIZE
-(if defined) in \fI<limits.h>\fP or by calling
+(if defined) in
+.I <limits.h>
+or by calling
.IR sysconf(_SC_PAGESIZE) .
.P
On POSIX systems on which
.BR munlockall ()
are available,
.B _POSIX_MEMLOCK
-is defined in \fI<unistd.h>\fP to a value greater than 0.
+is defined in
+.I <unistd.h>
+to a value greater than 0.
(See also
.BR sysconf (3).)
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.BR munmap ()
are available,
.B _POSIX_MAPPED_FILES
-is defined in \fI<unistd.h>\fP to a value greater than 0.
+is defined in
+.I <unistd.h>
+to a value greater than 0.
(See also
.BR sysconf (3).)
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.P
The
.I user_desc
-structure is defined in \fI<asm/ldt.h>\fP as:
+structure is defined in
+.I <asm/ldt.h>
+as:
.P
.in +4n
.EX
.P
The
.I mountflags
-argument may have the magic number 0xC0ED (\fBMS_MGC_VAL\fP)
+argument may have the magic number 0xC0ED
+.RB ( MS_MGC_VAL )
in the top 16 bits.
(All of the other flags discussed in DESCRIPTION
occupy the low order 16 bits of
in 1.1.69
when a different
.B MS_SYNC
-was added to \fI<mman.h>\fP.
+was added to
+.IR <mman.h> .
.P
Before Linux 2.4 an attempt to execute a set-user-ID or set-group-ID program
on a filesystem mounted with
.IR /proc/ pid /mountinfo
file (see below).
.\"
-.SS \fI/proc/\fPpid\fI/mounts\fP and \fI/proc/\fPpid\fI/mountinfo\fP
+.SS \f[I]/proc/\f[]pid\f[I]/mounts\f[] and \f[I]/proc/\f[]pid\f[I]/mountinfo\f[]
The Linux-specific
.IR /proc/ pid /mounts
file exposes the list of mounts in the mount
.BR mprotect ()
changes the access protections for the calling process's memory pages
containing any part of the address range in the
-interval [\fIaddr\fP,\ \fIaddr\fP+\fIsize\fP\-1].
+interval
+.RI [ addr ,
+.IR addr + size \-1].
.I addr
must be aligned to a page boundary.
.P
.BR PROT_WRITE .
.TP
.B EINVAL
-\fIaddr\fP is not a valid pointer,
+.I addr
+is not a valid pointer,
or not a multiple of the system page size.
.TP
.B EINVAL
.RB ( pkey_mprotect ())
-\fIpkey\fP has not been allocated with
+.I pkey
+has not been allocated with
.BR pkey_alloc (2)
.TP
.B EINVAL
.SH DESCRIPTION
.BR mremap ()
expands (or shrinks) an existing memory mapping, potentially
-moving it at the same time (controlled by the \fIflags\fP argument and
+moving it at the same time (controlled by the
+.I flags
+argument and
the available virtual address space).
.P
-\fIold_address\fP is the old address of the virtual memory block that you
+.I old_address
+is the old address of the virtual memory block that you
want to expand (or shrink).
-Note that \fIold_address\fP has to be page
-aligned.
-\fIold_size\fP is the old size of the
+Note that
+.I old_address
+has to be page aligned.
+.I old_size
+is the old size of the
virtual memory block.
-\fInew_size\fP is the requested size of the
+.I new_size
+is the requested size of the
virtual memory block after the resize.
An optional fifth argument,
.IR new_address ,
.B MREMAP_FIXED
below.
.P
-If the value of \fIold_size\fP is zero, and \fIold_address\fP refers to
+If the value of
+.I old_size
+is zero, and
+.I old_address
+refers to
a shareable mapping
(see the description of
.B MAP_SHARED
then
.BR mremap ()
will create a new mapping of the same pages.
-\fInew_size\fP
+.I new_size
will be the size of the new mapping and the location of the new mapping
-may be specified with \fInew_address\fP; see the description of
+may be specified with
+.IR new_address ;
+see the description of
.B MREMAP_FIXED
below.
If a new mapping is requested via this method, then the
.B MREMAP_MAYMOVE
flag must also be specified.
.P
-The \fIflags\fP bit-mask argument may be 0, or include the following flags:
+The
+.I flags
+bit-mask argument may be 0, or include the following flags:
.TP
.B MREMAP_MAYMOVE
By default, if there is not sufficient space to expand a mapping
returns a pointer to the new virtual memory area.
On error, the value
.B MAP_FAILED
-(that is, \fI(void\ *)\ \-1\fP) is returned,
-and \fIerrno\fP is set to indicate the error.
+(that is,
+.IR "(void\ *)\ \-1" )
+is returned,
+and
+.I errno
+is set to indicate the error.
.SH ERRORS
.TP
.B EAGAIN
.TP
.B EFAULT
Some address in the range
-\fIold_address\fP to \fIold_address\fP+\fIold_size\fP is an invalid
+.I old_address
+to
+.IR old_address + old_size
+is an invalid
virtual memory address for this process.
You can also get
.B EFAULT
Possible causes are:
.RS
.IP \[bu] 3
-\fIold_address\fP was not
-page aligned;
+.I old_address
+was not page aligned;
.IP \[bu]
a value other than
.B MREMAP_MAYMOVE
was not equal to
.IR new_size ;
.IP \[bu]
-\fIold_size\fP was zero and \fIold_address\fP does not refer to a
+.I old_size
+was zero and
+.I old_address
+does not refer to a
shareable mapping (but see BUGS);
.IP \[bu]
-\fIold_size\fP was zero and the
+.I old_size
+was zero and the
.B MREMAP_MAYMOVE
flag was not specified.
.RE
.IP \[bu] 3
The memory area cannot be expanded at the current virtual address, and the
.B MREMAP_MAYMOVE
-flag is not set in \fIflags\fP.
+flag is not set in
+.IR flags .
Or, there is not enough (virtual) memory available.
.IP \[bu]
.B MREMAP_DONTUNMAP
.P
Your favorite text book on operating systems
for more information on paged memory
-(e.g., \fIModern Operating Systems\fP by Andrew S.\& Tanenbaum,
-\fIInside Linux\fP by Randolph Bentson,
-\fIThe Design of the UNIX Operating System\fP by Maurice J.\& Bach)
+(e.g.,
+.I Modern Operating Systems
+by Andrew S.\& Tanenbaum,
+.I Inside Linux
+by Randolph Bentson,
+.I The Design of the UNIX Operating System
+by Maurice J.\& Bach)
.P
The
.I msqid_ds
-data structure is defined in \fI<sys/msg.h>\fP as follows:
+data structure is defined in
+.I <sys/msg.h>
+as follows:
.P
.in +4n
.EX
.EX
struct ipc_perm {
key_t __key; /* Key supplied to msgget(2) */
- uid_t \fBuid\fP; /* Effective UID of owner */
- gid_t \fBgid\fP; /* Effective GID of owner */
+ uid_t \f[B]uid\f[]; /* Effective UID of owner */
+ gid_t \f[B]gid\f[]; /* Effective GID of owner */
uid_t cuid; /* Effective UID of creator */
gid_t cgid; /* Effective GID of creator */
- unsigned short \fBmode\fP; /* Permissions */
+ unsigned short \f[B]mode\f[]; /* Permissions */
unsigned short __seq; /* Sequence number */
};
.EE
POSIX.1-2001, SVr4.
.\" SVID does not document the EIDRM error condition.
.P
-Various fields in the \fIstruct msqid_ds\fP were
-typed as
+Various fields in the
+.I struct\ msqid_ds
+were typed as
.I short
under Linux 2.2
and have become
.P
The
.I msgp
-argument is declared as \fIstruct msgbuf\ *\fP in
-glibc 2.0 and 2.1.
-It is declared as \fIvoid\ *\fP
+argument is declared as
+.I struct\ msgbuf\ *
+in glibc 2.0 and 2.1.
+It is declared as
+.I void\ *
in glibc 2.2 and later, as required by SUSv2 and SUSv3.
.SH NOTES
The following limits on message queue resources affect the
and
.BR msgrcv ().
.P
-The example program is first run with the \fB\-s\fP option to send a
-message and then run again with the \fB\-r\fP option to receive a
-message.
+The example program is first run with the
+.B \-s
+option to send a message
+and then run again with the
+.B \-r
+option to receive a message.
.P
The following shell session shows a sample run of the program:
.P
.B #include <fcntl.h>
.P
.BI "int open(const char *" pathname ", int " flags ", ..."
-.BI " \fR/*\fP mode_t " mode " \fR*/\fP );"
+.BI " \f[R]/*\f[] mode_t " mode " \f[R]*/\f[] );"
.P
.BI "int creat(const char *" pathname ", mode_t " mode );
.P
.BI "int openat(int " dirfd ", const char *" pathname ", int " flags ", ..."
-.BI " \fR/*\fP mode_t " mode " \fR*/\fP );"
+.BI " \f[R]/*\f[] mode_t " mode " \f[R]*/\f[] );"
.P
/* Documented separately, in \c
.BR openat2 (2):\c
.BR raw (8).
.TP
.B O_DIRECTORY
-If \fIpathname\fP is not a directory, cause the open to fail.
+If
+.I pathname
+is not a directory, cause the open to fail.
.\" But see the following and its replies:
.\" http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
.\" [PATCH] open: O_DIRECTORY and O_CREAT together should fail
.B O_PATH
below.
.\" The headers from glibc 2.0.100 and later include a
-.\" definition of this flag; \fIkernels before Linux 2.1.126 will ignore it if
-.\" used\fP.
+.\" definition of this flag; \f[I]kernels before Linux 2.1.126 will ignore it if
+.\" used\f[].
.TP
.BR O_NONBLOCK " or " O_NDELAY
When possible, the file is opened in nonblocking mode.
.B ENOTDIR
A component used as a directory in
.I pathname
-is not, in fact, a directory, or \fBO_DIRECTORY\fP was specified and
+is not, in fact, a directory, or
+.B O_DIRECTORY
+was specified and
.I pathname
was not a directory.
.TP
.P
.in +4n
.EX
-$ \fBecho \[aq]Can you please think about it?\[aq] > cecilia.txt\fP
-$ \fB./t_name_to_handle_at cecilia.txt > fh\fP
-$ \fB./t_open_by_handle_at < fh\fP
+.RB $ " echo \[aq]Can you please think about it?\[aq] > cecilia.txt" ;
+.RB $ " ./t_name_to_handle_at cecilia.txt > fh" ;
+.RB $ " ./t_open_by_handle_at < fh" ;
open_by_handle_at: Operation not permitted
-$ \fBsudo ./t_open_by_handle_at < fh\fP # Need CAP_SYS_ADMIN
+.RB $ " sudo ./t_open_by_handle_at < fh" "; # Need CAP_SYS_ADMIN"
Read 31 bytes
-$ \fBrm cecilia.txt\fP
+.RB $ " rm cecilia.txt" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBstat \-\-printf="%i\[rs]n" cecilia.txt\fP # Display inode number
+.RB $ " stat \-\-printf=\[dq]%i\[rs]n\[dq] cecilia.txt" "; # Display inode number"
4072121
-$ \fBrm cecilia.txt\fP
-$ \fBecho \[aq]Can you please think about it?\[aq] > cecilia.txt\fP
-$ \fBstat \-\-printf="%i\[rs]n" cecilia.txt\fP # Check inode number
+.RB $ " rm cecilia.txt" ;
+.RB $ " echo \[aq]Can you please think about it?\[aq] > cecilia.txt" ;
+.RB $ " stat \-\-printf=\[dq]%i\[rs]n\[dq] cecilia.txt" "; # Check inode number"
4072121
-$ \fBsudo ./t_open_by_handle_at < fh\fP
+.RB $ " sudo ./t_open_by_handle_at < fh" ;
open_by_handle_at: Stale NFS file handle
.EE
.in
.P
Rather than taking a single
.I flags
-argument, an extensible structure (\fIhow\fP) is passed to allow for
+argument, an extensible structure
+.RI ( how )
+is passed to allow for
future extensions.
The
.I size
.\" in addition to that given in
.\" .BR outb (9).
.P
-You must compile with \fB\-O\fP or \fB\-O2\fP or similar.
+You must compile with
+.B \-O
+or
+.B \-O2
+or similar.
The functions
are defined as inline macros, and will not be substituted in without
optimization enabled, causing unresolved references at link time.
.I cmd
to the input arguments specified by
.IR arg .
-The number of arguments is defined by \fInarg\fR.
+The number of arguments is defined by
+.IR narg .
The
.I fd
argument specifies the perfmon context to operate on.
parameter is ignored.
A new perfmon context is created as specified in
.I ctxt
-and its file descriptor is returned in \fIctxt\->ctx_fd\fR.
+and its file descriptor is returned in
+.IR ctxt\->ctx_fd .
.IP
The file descriptor can be used in subsequent calls to
.BR perfmonctl ()
.BR pivot_root ()
changes the root mount in the mount namespace of the calling process.
More precisely, it moves the root mount to the
-directory \fIput_old\fP and makes \fInew_root\fP the new root mount.
+directory
+.I put_old
+and makes
+.I new_root
+the new root mount.
The calling process must have the
.B CAP_SYS_ADMIN
capability in the user namespace that owns the caller's mount namespace.
does not change the caller's current working directory
(unless it is on the old root directory),
and thus it should be followed by a
-\fBchdir("/")\fP call.
+.I chdir("/")
+call.
.P
The following restrictions apply:
.IP \[bu] 3
.I put_old
must not be on the same mount as the current root.
.IP \[bu]
-\fIput_old\fP must be at or underneath \fInew_root\fP;
+.I put_old
+must be at or underneath
+.IR new_root ;
that is, adding some nonnegative
-number of "\fI/..\fP" suffixes to the pathname pointed to by
+number of
+.RI \[dq] /.. \[dq]
+suffixes to the pathname pointed to by
.I put_old
-must yield the same directory as \fInew_root\fP.
+must yield the same directory as
+.IR new_root .
.IP \[bu]
.I new_root
must be a path to a mount point, but can't be
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
-\fIerrno\fP is set to indicate the error.
+.I errno
+is set to indicate the error.
.SH ERRORS
.BR pivot_root ()
may fail with any of the same errors as
is not a mount point.
.TP
.B EINVAL
-\fIput_old\fP is not at or underneath \fInew_root\fP.
+.I put_old
+is not at or underneath
+.IR new_root .
.TP
.B EINVAL
The current root directory is not a mount point
.BR MS_SHARED .
.TP
.B ENOTDIR
-\fInew_root\fP or \fIput_old\fP is not a directory.
+.I new_root
+or
+.I put_old
+is not a directory.
.TP
.B EPERM
The calling process does not have the
must ensure that processes with root or current working directory
at the old root operate correctly in either case.
An easy way to ensure this is to change their
-root and current working directory to \fInew_root\fP before invoking
+root and current working directory to
+.I new_root
+before invoking
.BR pivot_root ().
.RE
.P
.P
.in +4n
.EX
-$ \fBmkdir /tmp/rootfs\fP
-$ \fBls \-id /tmp/rootfs\fP # Show inode number of new root directory
+.RB $ " mkdir /tmp/rootfs" ;
+.RB $ " ls \-id /tmp/rootfs" "; # Show inode number of new root directory"
319459 /tmp/rootfs
-$ \fBcp $(which busybox) /tmp/rootfs\fP
-$ \fBPS1=\[aq]bbsh$ \[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh\fP
-bbsh$ \fBPATH=/\fP
-bbsh$ \fBbusybox ln busybox ln\fP
-bbsh$ \fBln busybox echo\fP
-bbsh$ \fBln busybox ls\fP
-bbsh$ \fBls\fP
+.RB $ " cp $(which busybox) /tmp/rootfs" ;
+.RB $ " PS1=\[aq]bbsh$ \[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh" ;
+.RB bbsh$ " PATH=/" ;
+.RB bbsh$ " busybox ln busybox ln" ;
+.RB bbsh$ " ln busybox echo" ;
+.RB bbsh$ " ln busybox ls" ;
+.RB bbsh$ " ls" ;
busybox echo ln ls
-bbsh$ \fBls \-id /\fP # Compare with inode number above
+.RB bbsh$ " ls \-id /" "; # Compare with inode number above"
319459 /
-bbsh$ \fBecho \[aq]hello world\[aq]\fP
+.RB bbsh$ " echo \[aq]hello world\[aq]" ;
hello world
.EE
.in
.I events
and
.I revents
-are defined in \fI<poll.h>\fP:
+are defined in
+.IR <poll.h> :
.TP
.B POLLIN
There is data to read.
.P
.in +4n
.EX
-$ \fBmkfifo myfifo\fP
-$ \fB./poll_input myfifo\fP
+.RB $ " mkfifo myfifo" ;
+.RB $ " ./poll_input myfifo" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBecho aaaaabbbbbccccc > myfifo\fP
+.RB $ " echo aaaaabbbbbccccc > myfifo" ;
.EE
.in
.P
file data in a specific pattern in the future, thus allowing the kernel
to perform appropriate optimizations.
.P
-The \fIadvice\fP applies to a (not necessarily existent) region starting
-at \fIoffset\fP and extending for \fIsize\fP bytes (or until the end of
-the file if \fIsize\fP is 0) within the file referred to by \fIfd\fP.
-The \fIadvice\fP is not binding;
+The
+.I advice
+applies to a (not necessarily existent) region
+starting at
+.I offset
+and extending for
+.I size
+bytes
+(or until the end of the file if
+.I size
+is 0)
+within the file referred to by
+.IR fd .
+The
+.I advice
+is not binding;
it merely constitutes an expectation on behalf of
the application.
.P
-Permissible values for \fIadvice\fP include:
+Permissible values for
+.I advice
+include:
.TP
.B POSIX_FADV_NORMAL
Indicates that the application has no advice to give about its access
.B POSIX_FADV_NOREUSE
The specified data will be accessed only once.
.IP
-Before Linux 2.6.18, \fBPOSIX_FADV_NOREUSE\fP had the
-same semantics as \fBPOSIX_FADV_WILLNEED\fP.
+Before Linux 2.6.18,
+.B POSIX_FADV_NOREUSE
+had the
+same semantics as
+.BR POSIX_FADV_WILLNEED .
This was probably a bug;
from Linux 2.6.18 until Linux 6.2 this flag was a no-op.
Since Linux 6.3,
.B POSIX_FADV_WILLNEED
The specified data will be accessed in the near future.
.IP
-\fBPOSIX_FADV_WILLNEED\fP initiates a
+.B POSIX_FADV_WILLNEED
+initiates a
nonblocking read of the specified region into the page cache.
The amount of data read may be decreased by the kernel depending
on virtual memory load.
.B POSIX_FADV_DONTNEED
The specified data will not be accessed in the near future.
.IP
-\fBPOSIX_FADV_DONTNEED\fP attempts to free cached pages associated with
+.B POSIX_FADV_DONTNEED
+attempts to free cached pages associated with
the specified region.
This is useful, for example, while streaming large
files.
.SH ERRORS
.TP
.B EBADF
-The \fIfd\fP argument was not a valid file descriptor.
+The
+.I fd
+argument was not a valid file descriptor.
.TP
.B EINVAL
-An invalid value was specified for \fIadvice\fP.
+An invalid value was specified for
+.IR advice .
.TP
.B ESPIPE
The specified file descriptor refers to a pipe or FIFO.
.B EINVAL
in this case.)
.SH VERSIONS
-Under Linux, \fBPOSIX_FADV_NORMAL\fP sets the readahead window to the
-default size for the backing device; \fBPOSIX_FADV_SEQUENTIAL\fP doubles
-this size, and \fBPOSIX_FADV_RANDOM\fP disables file readahead entirely.
+Under Linux,
+.B POSIX_FADV_NORMAL
+sets the readahead window to the
+default size for the backing device;
+.B POSIX_FADV_SEQUENTIAL
+doubles this size,
+and
+.B POSIX_FADV_RANDOM
+disables file readahead entirely.
.B POSIX_FADV_NOREUSE
does not modify the readahead window size.
These changes affect the entire file, not just the specified region
(or, on some architectures,
.BR fadvise64_64 ());
the difference between the two is that the former system call
-assumes that the type of the \fIsize\fP argument is \fIsize_t\fP,
-while the latter expects \fIloff_t\fP there.
+assumes that the type of the
+.I size
+argument is
+.IR size_t ,
+while the latter expects
+.I loff_t
+there.
.SS Architecture-specific variants
Some architectures require
64-bit arguments to be aligned in a suitable pair of registers (see
.EX
struct old_linux_dirent {
unsigned long d_ino; /* inode number */
- unsigned long d_offset; /* offset to this \fIold_linux_dirent\fP */
- unsigned short d_namlen; /* length of this \fId_name\fP */
+ unsigned long d_offset; /* offset to this \f[I]old_linux_dirent\f[] */
+ unsigned short d_namlen; /* length of this \f[I]d_name\f[] */
char d_name[1]; /* filename (null\-terminated) */
}
.EE
and
.BR write (2)).
.P
-On error, \-1 is returned, and \fIerrno\fP is set to indicate the error.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
.SH ERRORS
The errors are as given for
.BR read (2)
.I statx.
.TP
.B EOPNOTSUPP
-An unknown flag is specified in \fIflags\fP.
+An unknown flag is specified in
+.IR flags .
.SH VERSIONS
.SS C library/kernel differences
The raw
.BR writev ()
POSIX.1-2001,
4.4BSD (first appeared in 4.2BSD).
-.\" Linux libc5 used \fIsize_t\fP as the type of the \fIiovcnt\fP argument,
-.\" and \fIint\fP as the return type.
+.\" Linux libc5 used
+.\" .I size_t
+.\" as the type of the
+.\" .I iovcnt
+.\" argument,
+.\" and
+.\" .I int
+.\" as the return type.
.\" The readv/writev system calls were buggy before Linux 1.3.40.
.\" (Says release.libc.)
.P
.P
.in +4n
.EX
-$ sudo sh
-# \fBecho \[aq]create user mtk:* * /bin/keyctl instantiate %k %c %S\[aq] \[rs]\fP
- \fB> /etc/request\-key.conf\fP
-# \fBexit\fP
+.RB $ " sudo sh" ;
+.RB # " echo \[aq]create user mtk:* * /bin/keyctl instantiate %k %c %S\[aq] \[rs]"
+.BR " > /etc/request\-key.conf" ;
+.RB # " exit" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fB./t_request_key user mtk:key1 "Payload data"\fP
-$ \fBgrep \[aq]2dddaf50\[aq] /proc/keys\fP
+.RB $ " ./t_request_key user mtk:key1 \[dq]Payload data\[dq]" ;
+.RB $ " grep \[aq]2dddaf50\[aq] /proc/keys" ;
2dddaf50 I\-\-Q\-\-\- 1 perm 3f010000 1000 1000 user mtk:key1: 12
.EE
.in
.IR pid .
.TP
.B ESRCH
-The thread whose ID is \fIpid\fP could not be found.
+The thread whose ID is
+.I pid
+could not be found.
.SH STANDARDS
Linux.
.SH HISTORY
.P
.in +4n
.EX
-$ \fBlscpu | egrep \-i \[aq]core.*:|socket\[aq]\fP
+.RB $ " lscpu | egrep \-i \[aq]core.*:|socket\[aq]" ;
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
.P
.in +4n
.EX
-$ \fBtime \-p ./a.out 0 0 100000000\fP
+.RB $ " time \-p ./a.out 0 0 100000000" ;
real 14.75
user 3.02
sys 11.73
-$ \fBtime \-p ./a.out 0 1 100000000\fP
+.RB $ " time \-p ./a.out 0 1 100000000" ;
real 11.52
user 3.98
sys 19.06
-$ \fBtime \-p ./a.out 0 3 100000000\fP
+.RB $ " time \-p ./a.out 0 3 100000000" ;
real 7.89
user 3.29
sys 12.07
.BI "int sched_setparam(pid_t " pid ", const struct sched_param *" param );
.BI "int sched_getparam(pid_t " pid ", struct sched_param *" param );
.P
-\fBstruct sched_param {
+\f[B]struct sched_param {
...
- int \fIsched_priority\fB;
+ int \f[I]sched_priority\f[];
...
-};
+};\f[]
.fi
.SH DESCRIPTION
.BR sched_setparam ()
sets the scheduling parameters associated with the scheduling policy
-for the thread whose thread ID is specified in \fIpid\fP.
-If \fIpid\fP is zero, then
+for the thread whose thread ID is specified in
+.IR pid .
+If
+.I pid
+is zero, then
the parameters of the calling thread are set.
The interpretation of
-the argument \fIparam\fP depends on the scheduling
-policy of the thread identified by
+the argument
+.I param
+depends on the scheduling policy
+of the thread identified by
.IR pid .
See
.BR sched (7)
.P
.BR sched_getparam ()
retrieves the scheduling parameters for the
-thread identified by \fIpid\fP.
-If \fIpid\fP is zero, then the parameters
+thread identified by
+.IR pid .
+If
+.I pid
+is zero, then the parameters
of the calling thread are retrieved.
.P
.BR sched_setparam ()
-checks the validity of \fIparam\fP for the scheduling policy of the
-thread.
-The value \fIparam\->sched_priority\fP must lie within the
+checks the validity of
+.I param
+for the scheduling policy of the thread.
+The value
+.I param\->sched_priority
+must lie within the
range given by
.BR sched_get_priority_min (2)
and
.BR sched_getparam ()
are available define
.B _POSIX_PRIORITY_SCHEDULING
-in \fI<unistd.h>\fP.
+in
+.IR <unistd.h> .
.SH RETURN VALUE
On success,
.BR sched_setparam ()
.TP
.B EINVAL
.RB ( sched_setparam ())
-The argument \fIparam\fP does not make sense for the current
+The argument
+.I param
+does not make sense for the current
scheduling policy.
.TP
.B EPERM
capability).
.TP
.B ESRCH
-The thread whose ID is \fIpid\fP could not be found.
+The thread whose ID is
+.I pid
+could not be found.
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
.BR sched_setscheduler ()
system call
sets both the scheduling policy and parameters for the
-thread whose ID is specified in \fIpid\fP.
-If \fIpid\fP equals zero, the
+thread whose ID is specified in
+.IR pid .
+If
+.I pid
+equals zero, the
scheduling policy and parameters of the calling thread will be set.
.P
The scheduling parameters are specified in the
.P
.BR sched_getscheduler ()
returns the current scheduling policy of the thread
-identified by \fIpid\fP.
-If \fIpid\fP equals zero, the policy of the
+identified by
+.IR pid .
+If
+.I pid
+equals zero, the policy of the
calling thread will be retrieved.
.SH RETURN VALUE
On success,
The calling thread does not have appropriate privileges.
.TP
.B ESRCH
-The thread whose ID is \fIpid\fP could not be found.
+The thread whose ID is
+.I pid
+could not be found.
.SH VERSIONS
POSIX.1 does not detail the permissions that an unprivileged
thread requires in order to call
.BR sched_getscheduler ()
are available define
.B _POSIX_PRIORITY_SCHEDULING
-in \fI<unistd.h>\fP.
+in
+.IR <unistd.h> .
.SH BUGS
POSIX.1 says that on success,
.BR sched_setscheduler ()
.BR SECCOMP_RET_DATA )
are "data" to be associated with this return value.
.P
-If multiple filters exist, they are \fIall\fP executed,
+If multiple filters exist, they are
+.I all
+executed,
in reverse order of their addition to the filter tree\[em]that is,
the most recently installed filter is executed first.
(Note that all filters will be called
.P
.in +4n
.EX
-$ \fBuname \-m\fP
+.RB $ " uname \-m" ;
x86_64
-$ \fBsyscall_nr() {
+$ \f[B]syscall_nr() {
cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \[rs]
- awk \[aq]$2 != "x32" && $3 == "\[aq]$1\[aq]" { print $1 }\[aq]
-}\fP
+ awk \[aq]$2 != \[dq]x32\[dq] && $3 == \[dq]\[aq]$1\[aq]\[dq] { print $1 }\[aq]
+}\f[];
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBerrno 99\fP
+.RB $ " errno 99" ;
EADDRNOTAVAIL 99 Cannot assign requested address
.EE
.in
.P
.in +4n
.EX
-$ \fBsyscall_nr execve\fP
+.RB $ " syscall_nr execve" ;
59
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
Usage: ./a.out <syscall_nr> <arch> <errno> <prog> [<args>]
Hint for <arch>: AUDIT_ARCH_I386: 0x40000003
AUDIT_ARCH_X86_64: 0xC000003E
-$ \fB./a.out 59 0xC000003E 99 /bin/whoami\fP
+.RB $ " ./a.out 59 0xC000003E 99 /bin/whoami" ;
execv: Cannot assign requested address
.EE
.in
.P
.in +4n
.EX
-$ \fBsyscall_nr write\fP
+.RB $ " syscall_nr write" ;
1
-$ \fB./a.out 1 0xC000003E 99 /bin/whoami\fP
+.RB $ " ./a.out 1 0xC000003E 99 /bin/whoami" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBsyscall_nr preadv\fP
+.RB $ " syscall_nr preadv" ;
295
-$ \fB./a.out 295 0xC000003E 99 /bin/whoami\fP
+.RB $ " ./a.out 295 0xC000003E 99 /bin/whoami" ;
cecilia
.EE
.in
another security mechanism or the kernel itself will sufficiently block
the system call if its arguments are rewritten to something unsafe.
.\"
-.SS Caveats regarding the use of \fI/proc/\fPtid\fI/mem\fP
+.SS Caveats regarding the use of
+.IR /proc/ tid /mem
The discussion above noted the need to use the
.B SECCOMP_IOCTL_NOTIF_ID_VALID
.BR ioctl (2)
.P
.in +4n
.EX
-$ \fB./seccomp_unotify /tmp/x\fP
+.RB $ " ./seccomp_unotify /tmp/x" ;
T: PID = 23168
\&
T: about to mkdir("/tmp/x")
.P
.in +4n
.EX
-$ \fB./seccomp_unotify ./sub\fP
+.RB $ " ./seccomp_unotify ./sub" ;
T: PID = 23204
\&
T: about to mkdir("./sub")
.P
.in +4n
.EX
-$ \fB./seccomp_unotify /xxx\fP
+.RB $ " ./seccomp_unotify /xxx" ;
T: PID = 23178
\&
T: about to mkdir("/xxx")
.P
.in +4n
.EX
-$ \fB./seccomp_unotify /tmp/nosuchdir/b\fP
+.RB $ " ./seccomp_unotify /tmp/nosuchdir/b" ;
T: PID = 23199
\&
T: about to mkdir("/tmp/nosuchdir/b")
.P
.in +4n
.EX
-$ \fB./seccomp_unotify /bye /tmp/y\fP
+.RB $ " ./seccomp_unotify /bye /tmp/y" ;
T: PID = 23185
\&
T: about to mkdir("/bye")
to indicate which file descriptors are currently "ready".
Thus, if using
.BR select ()
-within a loop, the sets \fImust be reinitialized\fP before each call.
+within a loop, the sets
+.I must be reinitialized
+before each call.
.P
The contents of a file descriptor set can be manipulated
using the following macros:
.IP
After
.BR select ()
-has returned, \fIreadfds\fP will be
+has returned,
+.I readfds
+will be
cleared of all file descriptors except for those that are ready for reading.
.TP
.I writefds
.IP
After
.BR select ()
-has returned, \fIwritefds\fP will be
+has returned,
+.I writefds
+will be
cleared of all file descriptors except for those that are ready for writing.
.TP
.I exceptfds
After
.BR select ()
has returned,
-\fIexceptfds\fP will be cleared of all file descriptors except for those
+.I exceptfds
+will be cleared of all file descriptors except for those
for which an exceptional condition has occurred.
.TP
.I nfds
This causes problems both when Linux code which reads
.I timeout
is ported to other operating systems, and when code is ported to Linux
-that reuses a \fIstruct timeval\fP for multiple
+that reuses a
+.I struct\ timeval
+for multiple
.BR select ()s
in a loop without reinitializing it.
Consider
.BR select ()
(or
.BR pselect ())
-call to return with \fIerrno\fP set to \fBEINTR\fP.
+call to return with
+.I errno
+set to
+.BR EINTR .
This behavior is essential so that signals can be processed
in the main loop of the program, otherwise
.BR select ()
For instance, let us say that the event in question
was the exit of a child process.
Before the start of the main loop, we
-would block \fBSIGCHLD\fP using
+would block
+.B SIGCHLD
+using
.BR sigprocmask (2).
Our
.BR pselect ()
depends on timeouts is not usually portable and is difficult to debug.
.TP
2.
-The value \fInfds\fP must be properly calculated for efficiency as
-explained above.
+The value
+.I nfds
+must be properly calculated for efficiency
+as explained above.
.TP
3.
No file descriptor must be added to any set if you do not intend
.BR write (2),
and
.BR send (2)
-do \fInot\fP necessarily read/write the full amount of data
+do
+.I not
+necessarily read/write the full amount of data
that you have requested.
If they do read/write the full amount, it's
because you have a low traffic load and a fast stream.
and
.BR select ()
can fail with the error
-\fBEINTR\fP,
+.BR EINTR ,
and calls to
.BR read (2),
.BR recv (2),
.BR send (2)
can fail with
.I errno
-set to \fBEAGAIN\fP (\fBEWOULDBLOCK\fP).
+set to
+.B EAGAIN
+.RB ( EWOULDBLOCK ).
These results must be properly managed (not done properly above).
If your program is not going to receive any signals, then
-it is unlikely you will get \fBEINTR\fP.
+it is unlikely you will get
+.BR EINTR .
If your program does not set nonblocking I/O,
-you will not get \fBEAGAIN\fP.
+you will not get
+.BR EAGAIN .
.\" Nonetheless, you should still cope with these errors for completeness.
.TP
8.
.BR write (2),
and
.BR send (2)
-fail with errors other than those listed in \fB7.\fP,
+fail with errors other than those listed in
+.BR 7. ,
or one of the input functions returns 0, indicating end of file,
-then you should \fInot\fP pass that file descriptor to
+then you should
+.I not
+pass that file descriptor to
.BR select ()
again.
In the example below,
.\" SRC END
.P
The above program properly forwards most kinds of TCP connections
-including OOB signal data transmitted by \fBtelnet\fP servers.
+including OOB signal data transmitted by
+.B telnet
+servers.
It handles the tricky problem of having data flow in both directions
simultaneously.
You might think it more efficient to use a
.IR op .
When there are four, the fourth has the type
.IR "union semun" .
-The \fIcalling program\fP must define this union as follows:
+The
+.I calling program
+must define this union as follows:
.P
.in +4n
.EX
.P
The
.I semid_ds
-data structure is defined in \fI<sys/sem.h>\fP as follows:
+data structure is defined in
+.I <sys/sem.h>
+as follows:
.P
.in +4n
.EX
.EX
struct ipc_perm {
key_t __key; /* Key supplied to semget(2) */
- uid_t \fBuid\fP; /* Effective UID of owner */
- gid_t \fBgid\fP; /* Effective GID of owner */
+ uid_t \f[B]uid\f[]; /* Effective UID of owner */
+ gid_t \f[B]gid\f[]; /* Effective GID of owner */
uid_t cuid; /* Effective UID of creator */
gid_t cgid; /* Effective GID of creator */
- unsigned short \fBmode\fP; /* Permissions */
+ unsigned short \f[B]mode\f[]; /* Permissions */
unsigned short __seq; /* Sequence number */
};
.EE
POSIX.1-2001, SVr4.
.\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
.P
-Various fields in a \fIstruct semid_ds\fP were typed as
+Various fields in a
+.I struct\ semid_ds
+were typed as
.I short
under Linux 2.2
and have become
.P
In some earlier versions of glibc, the
.I semun
-union was defined in \fI<sys/sem.h>\fP, but POSIX.1 requires
+union was defined in
+.IR <sys/sem.h> ,
+but POSIX.1 requires
.\" POSIX.1-2001, POSIX.1-2008
that the caller define this union.
-On versions of glibc where this union is \fInot\fP defined,
+On versions of glibc where this union is
+.I not
+defined,
the macro
.B _SEM_SEMUN_UNDEFINED
-is defined in \fI<sys/sem.h>\fP.
+is defined in
+.IR <sys/sem.h> .
.SH NOTES
The
.BR IPC_INFO ,
.P
.in +4n
.EX
-$ \fBtouch mykey mykey2\fP
-$ \fB./t_semget \-c mykey p 1\fP
+.RB $ " touch mykey mykey2" ;
+.RB $ " ./t_semget \-c mykey p 1" ;
ID = 9
-$ \fB./t_semget \-c mykey2 p 2\fP
+.RB $ " ./t_semget \-c mykey2 p 2" ;
ID = 10
-$ \fBipcs \-s\fP
+.RB $ " ipcs \-s" ;
\&
\-\-\-\-\-\- Semaphore Arrays \-\-\-\-\-\-\-\-
key semid owner perms nsems
.P
.in +4n
.EX
-$ \fB./t_semget \-c mykey p 1\fP
+.RB $ " ./t_semget \-c mykey p 1" ;
ID = 9
.EE
.in
.P
.in +4n
.EX
-$ \fBln mykey link\fP
-$ \fBls \-i1 link mykey\fP
+.RB $ " ln mykey link" ;
+.RB $ " ls \-i1 link mykey" ;
2233197 link
2233197 mykey
-$ \fB./t_semget link p 1\fP # Generates same key as \[aq]mykey\[aq]
+.RB $ " ./t_semget link p 1" "; # Generates same key as \[aq]mykey\[aq]"
ID = 9
.EE
.in
.BR clone (2)
for details.
.P
-The \fIsemval\fP, \fIsempid\fP, \fIsemzcnt\fP, and \fIsemnct\fP values
+The
+.IR semval ,
+.IR sempid ,
+.IR semzcnt ,
+and
+.I semnct
+values
for a semaphore can all be retrieved using appropriate
.BR semctl (2)
calls.
struct sembuf sops[2];
int semid;
\&
-/* Code to set \fIsemid\fP omitted */
+/* Code to set \f[I]semid\f[] omitted */
\&
sops[0].sem_num = 0; /* Operate on semaphore 0 */
sops[0].sem_op = 0; /* Wait for value to equal 0 */
.SH ERRORS
.TP
.B EFAULT
-\fIu_info\fP is an invalid pointer.
+.I u_info
+is an invalid pointer.
.TP
.B EINVAL
-\fIu_info\->entry_number\fP is out of bounds.
+.I u_info\->entry_number
+is out of bounds.
.TP
.B ENOSYS
.BR get_thread_area ()
when the wrapper for this system call determines that the argument can't be
passed to the kernel without integer truncation (because the kernel
is old and does not support 32-bit group IDs),
-it will return \-1 and set \fIerrno\fP to
+it will return \-1 and set
+.I errno
+to
.B EINVAL
without attempting
the system call.
when the wrapper for this system call determines that the argument can't be
passed to the kernel without integer truncation (because the kernel
is old and does not support 32-bit user IDs),
-it will return \-1 and set \fIerrno\fP to
+it will return \-1 and set
+.I errno
+to
.B EINVAL
without attempting
the system call.
.TP
.B EPERM
The calling process is not privileged (does not have the
-\fBCAP_SETGID\fP capability in its user namespace), and
+.B CAP_SETGID
+capability in its user namespace), and
.I gid
does not match the real group ID or saved set-group-ID of
the calling process.
.I nstype
argument is interpreted differently in each case.
.\"
-.SS fd refers to a \fI/proc/\fPpid\fI/ns/\fP link
+.SS fd refers to a \f[I]/proc/\f[]pid\f[I]/ns/\f[] link
If
.I fd
refers to a
.P
.in +4n
.EX
-$ \fBsu\fP # Need privilege for namespace operations
+.RB $ " su" "; # Need privilege for namespace operations"
Password:
-# \fB./newuts bizarro &\fP
+.RB # " ./newuts bizarro &"
[1] 3549
clone() returned 3550
uts.nodename in child: bizarro
uts.nodename in parent: antero
-# \fBuname \-n\fP # Verify hostname in the shell
+.RB # " uname \-n" "; # Verify hostname in the shell"
antero
.EE
.in
.P
.in +4n
.EX
-# \fB./ns_exec /proc/3550/ns/uts /bin/bash\fP
-# \fBuname \-n\fP # Executed in shell started by ns_exec
+.RB # " ./ns_exec /proc/3550/ns/uts /bin/bash" ;
+.RB # " uname \-n" "; # Executed in shell started by ns_exec"
bizarro
.EE
.in
.BI "pid_t getpgid(pid_t " pid );
.P
.BR "pid_t getpgrp(void);" " /* POSIX.1 version */"
-.BI "[[deprecated]] pid_t getpgrp(pid_t " pid ");\fR /* BSD version */"
+.BI "[[deprecated]] pid_t getpgrp(pid_t " pid ");\f[R] /* BSD version */\f[]"
.P
.BR "int setpgrp(void);" " /* System V version */"
-.BI "[[deprecated]] int setpgrp(pid_t " pid ", pid_t " pgid ");\fR /* BSD version */"
+.BI "[[deprecated]] int setpgrp(pid_t " pid ", pid_t " pgid ");\f[R] /* BSD version */\f[]"
.fi
.P
.RS -4
and
.BR credentials (7)).
In this case,
-the \fIpgid\fP specifies an existing process group to be joined and the
+the
+.I pgid
+specifies an existing process group to be joined and the
session ID of that group must match the session ID of the joining process.
.P
The POSIX.1 version of
the current real UID, the current effective UID, or the
current saved set-user-ID.
.P
-A privileged process (on Linux, one having the \fBCAP_SETUID\fP capability)
+A privileged process (on Linux, one having the
+.B CAP_SETUID
+capability)
may set its real UID, effective UID, and
saved set-user-ID to arbitrary values.
.P
.P
The
.I buf
-argument is a pointer to a \fIshmid_ds\fP structure,
-defined in \fI<sys/shm.h>\fP as follows:
+argument is a pointer to a
+.I shmid_ds
+structure,
+defined in
+.I <sys/shm.h>
+as follows:
.P
.in +4n
.EX
.EX
struct ipc_perm {
key_t __key; /* Key supplied to shmget(2) */
- uid_t \fBuid\fP; /* Effective UID of owner */
- gid_t \fBgid\fP; /* Effective GID of owner */
+ uid_t \f[B]uid\f[]; /* Effective UID of owner */
+ gid_t \f[B]gid\f[]; /* Effective GID of owner */
uid_t cuid; /* Effective UID of creator */
gid_t cgid; /* Effective GID of creator */
- unsigned short \fBmode\fP; /* \fBPermissions\fP + SHM_DEST and
+ unsigned short \f[B]mode\f[]; /* \f[B]Permissions\f[] + SHM_DEST and
SHM_LOCKED flags */
unsigned short __seq; /* Sequence number */
};
.I shmid
into the
.I shmid_ds
-structure pointed to by \fIbuf\fP.
+structure pointed to by
+.IR buf .
The caller must have read permission on the
shared memory segment.
.TP
member.
.IP
The following fields are updated:
-\fIshm_perm.uid\fP, \fIshm_perm.gid\fP,
-and (the least significant 9 bits of) \fIshm_perm.mode\fP.
+.IR shm_perm.uid ,
+.IR shm_perm.gid ,
+and (the least significant 9 bits of)
+.IR shm_perm.mode .
.IP
The effective UID of the calling process must match the owner
.RI ( shm_perm.uid )
.B IPC_STAT
will be set.
.IP
-The caller \fImust\fP ensure that a segment is eventually destroyed;
+The caller
+.I must
+ensure that a segment is eventually destroyed;
otherwise its pages that were faulted in will remain in memory or swap.
.IP
See also the description of
.SH ERRORS
.TP
.B EACCES
-\fBIPC_STAT\fP or \fBSHM_STAT\fP is requested and
-\fIshm_perm.mode\fP does not allow read access for
+.B IPC_STAT
+or
+.B SHM_STAT
+is requested and
+.I shm_perm.mode
+does not allow read access for
.IR shmid ,
and the calling process does not have the
.B CAP_IPC_OWNER
isn't accessible.
.TP
.B EIDRM
-\fIshmid\fP points to a removed identifier.
+.I shmid
+points to a removed identifier.
.TP
.B EINVAL
.I shmid
.BR setrlimit (2)).
.TP
.B EOVERFLOW
-\fBIPC_STAT\fP is attempted, and the GID or UID value
+.B IPC_STAT
+is attempted, and the GID or UID value
is too large to be stored in the structure pointed to by
.IR buf .
.TP
.B EPERM
-\fBIPC_SET\fP or \fBIPC_RMID\fP is attempted, and the
+.B IPC_SET
+or
+.B IPC_RMID
+is attempted, and the
effective user ID of the calling process is not that of the creator
(found in
.IR shm_perm.cuid ),
.\" ENOENT, ENOSPC, ENOMEM, EEXIST. Neither SVr4 nor SVID documents
.\" an EIDRM error condition.
.P
-Various fields in a \fIstruct shmid_ds\fP were typed as
+Various fields in a
+.I struct\ shmid_ds
+were typed as
.I short
under Linux 2.2
and have become
Create a new segment.
If this flag is not used, then
.BR shmget ()
-will find the segment associated with \fIkey\fP and check to see if
+will find the segment associated with
+.I key
+and check to see if
the user has permission to access the segment.
.TP
.B IPC_EXCL
.B EINVAL
A segment for the given
.I key
-exists, but \fIsize\fP is greater than the size
+exists, but
+.I size
+is greater than the size
of that segment.
.TP
.B ENFILE
The system-wide limit on the total number of open files has been reached.
.TP
.B ENOENT
-No segment exists for the given \fIkey\fP, and
+No segment exists for the given
+.IR key ,
+and
.B IPC_CREAT
was not specified.
.TP
capability in the user namespace that governs its IPC namespace.
.TP
.B EIDRM
-\fIshmid\fP points to a removed identifier.
+.I shmid
+points to a removed identifier.
.TP
.B EINVAL
Invalid
.I shmid
-value, unaligned (i.e., not page-aligned and \fBSHM_RND\fP was not
-specified) or invalid
+value, unaligned (i.e., not page-aligned and
+.B SHM_RND
+was not specified)
+or invalid
.I shmaddr
value, or can't attach segment at
.IR shmaddr ,
.\" SVr4 documents an additional error condition EMFILE.
.P
In SVID 3 (or perhaps earlier),
-the type of the \fIshmaddr\fP argument was changed from
-.I "char\ *"
+the type of the
+.I shmaddr
+argument was changed from
+.I char\ *
into
.IR "const void\ *" ,
and the returned type of
.BR shmat ()
from
-.I "char\ *"
+.I char\ *
into
.IR "void\ *" .
.SH NOTES
.P
.in +4n
.EX
-$ \fB./svshm_string_read\fP
+.RB $ " ./svshm_string_read" ;
shmid = 1114194; semid = 15
.EE
.in
.P
.in +4n
.EX
-$ \fB./svshm_string_write 1114194 15 \[aq]Hello, world\[aq]\fP
+.RB $ " ./svshm_string_write 1114194 15 \[aq]Hello, world\[aq]" ;
.EE
.in
.P
.I ucontext
This is a pointer to a
.I ucontext_t
-structure, cast to \fIvoid\ *\fP.
+structure, cast to
+.IR "void\ *" .
The structure pointed to by this field contains
signal context information that was saved
on the user-space stack by the kernel; for details, see
int si_timerid; /* Timer ID; POSIX.1b timers */
.\" In the kernel: si_tid
void *si_addr; /* Memory location which caused fault */
- long si_band; /* Band event (was \fIint\fP in
+ long si_band; /* Band event (was \f[I]int\f[] in
glibc 2.3.2 and earlier) */
int si_fd; /* File descriptor */
short si_addr_lsb; /* Least significant bit of address
.BR sigaction (2),
inform the system that the signal handler should be executed
on the alternate signal stack by
-specifying the \fBSA_ONSTACK\fP flag.
+specifying the
+.B SA_ONSTACK
+flag.
.P
-The \fIss\fP argument is used to specify a new
-alternate signal stack, while the \fIold_ss\fP argument
+The
+.I ss
+argument is used to specify
+a new alternate signal stack,
+while the
+.I old_ss
+argument
is used to retrieve information about the currently
established signal stack.
If we are interested in performing just one
.I ss.ss_sp
This field specifies the starting address of the stack.
When a signal handler is invoked on the alternate stack,
-the kernel automatically aligns the address given in \fIss.ss_sp\fP
+the kernel automatically aligns the address given in
+.I ss.ss_sp
to a suitable address boundary for the underlying hardware architecture.
.TP
.I ss.ss_size
This field specifies the size of the stack.
-The constant \fBSIGSTKSZ\fP is defined to be large enough
+The constant
+.B SIGSTKSZ
+is defined to be large enough
to cover the usual size requirements for an alternate signal stack,
-and the constant \fBMINSIGSTKSZ\fP defines the minimum
+and the constant
+.B MINSIGSTKSZ
+defines the minimum
size required to execute a signal handler.
.P
-To disable an existing stack, specify \fIss.ss_flags\fP
-as \fBSS_DISABLE\fP.
+To disable an existing stack, specify
+.I ss.ss_flags
+as
+.BR SS_DISABLE .
In this case, the kernel ignores any other flags in
.I ss.ss_flags
and the remaining fields
-in \fIss\fP.
+in
+.IR ss .
.P
-If \fIold_ss\fP is not NULL, then it is used to return information about
+If
+.I old_ss
+is not NULL, then it is used to return information about
the alternate signal stack which was in effect prior to the
call to
.BR sigaltstack ().
-The \fIold_ss.ss_sp\fP and \fIold_ss.ss_size\fP fields return the starting
-address and size of that stack.
-The \fIold_ss.ss_flags\fP may return either of the following values:
+The
+.I old_ss.ss_sp
+and
+.I old_ss.ss_size
+fields return
+the starting address
+and size of that stack.
+The
+.I old_ss.ss_flags
+may return either of the following values:
.TP
.B SS_ONSTACK
The thread is currently executing on the alternate signal stack.
.SH RETURN VALUE
.BR sigaltstack ()
returns 0 on success, or \-1 on failure with
-\fIerrno\fP set to indicate the error.
+.I errno
+set to indicate the error.
.SH ERRORS
.TP
.B EFAULT
-Either \fIss\fP or \fIold_ss\fP is not NULL and points to an area
+Either
+.I ss
+or
+.I old_ss
+is not NULL and points to an area
outside of the process's address space.
.TP
.B EINVAL
-\fIss\fP is not NULL and the \fIss_flags\fP field contains
+.I ss
+is not NULL and the
+.I ss_flags
+field contains
an invalid flag.
.TP
.B ENOMEM
expects that it may exhaust its standard stack.
This may occur, for example, because the stack grows so large
that it encounters the upwardly growing heap, or it reaches a
-limit established by a call to \fB\%setrlimit(RLIMIT_STACK, &rlim)\fP.
+limit established by a call to
+.IR "\%setrlimit(RLIMIT_STACK,\ &rlim)" .
If the standard stack is exhausted, the kernel sends
-the thread a \fBSIGSEGV\fP signal.
+the thread a
+.B SIGSEGV
+signal.
In these circumstances the only way to catch this signal is
on an alternate signal stack.
.P
.BR signal ()
varies across UNIX versions,
and has also varied historically across different versions of Linux.
-\fBAvoid its use\fP: use
+.BR "Avoid its use" :
+use
.BR sigaction (2)
instead.
-See \fIPortability\fP below.
+See
+.I Portability
+below.
.P
.BR signal ()
sets the disposition of the signal
If the disposition is set to a function,
then first either the disposition is reset to
.BR SIG_DFL ,
-or the signal is blocked (see \fIPortability\fP below), and then
+or the signal is blocked (see
+.I Portability
+below), and then
.I handler
is called with argument
.IR signum .
uint16_t ssi_addr_lsb; /* Least significant bit of address
(SIGBUS; since Linux 2.6.37) */
.\" ssi_addr_lsb: commit b8aeec34175fc8fe8b0d40efea4846dfc1ba663e
- uint8_t pad[\fIX\fP]; /* Pad size to 128 bytes (allow for
+ uint8_t pad[\f[I]X\f[]]; /* Pad size to 128 bytes (allow for
additional fields in the future) */
};
.EE
Got SIGINT
.B \[ha]C
Got SIGINT
-\fB\[ha]\[rs]\fP # Control\-\[rs] generates SIGQUIT
+.BR "\[ha]\[rs]" " # Control\-\[rs] generates SIGQUIT"
Got SIGQUIT
$
.EE
.TS
tab(:);
l l.
-\fIcall\fR:Man page
+\f[I]call\f[]:Man page
T{
.B SYS_SOCKET
T}:T{
.I "unsigned\ int"
for such variables suffices on most systems.
.P
-Some systems have only \fI<sys/vfs.h>\fP, other systems also have
-\fI<sys/statfs.h>\fP, where the former includes the latter.
+Some systems have only
+.IR <sys/vfs.h> ,
+other systems also have
+.IR <sys/statfs.h> ,
+where the former includes the latter.
So it seems
including the former is the best choice.
.SH BUGS
.BR stime ()
sets the system's idea of the time and date.
The time, pointed
-to by \fIt\fP, is measured in seconds since the
-Epoch, 1970-01-01 00:00:00 +0000 (UTC).
+to by
+.IR t ,
+is measured in seconds since the Epoch,
+1970-01-01 00:00:00 +0000 (UTC).
.BR stime ()
may be executed only by the superuser.
.SH RETURN VALUE
For example,
.B __NR_readv
is defined as 19 for the x86-64 ABI and as
-.IR __X32_SYSCALL_BIT " | " \fB515\fP
+.IR __X32_SYSCALL_BIT " | " \f[B]515\f[]
for the x32 ABI.
Most of these additional system calls are actually identical
to the system calls used for providing i386 compat.
Lw(26n)2 L Lx.
System call Kernel Notes
_
-\fB_llseek\fP(2) 1.2
-\fB_newselect\fP(2) 2.0
-\fB_sysctl\fP(2) 2.0 Removed in 5.5
+\f[B]_llseek\f[](2) 1.2
+\f[B]_newselect\f[](2) 2.0
+\f[B]_sysctl\f[](2) 2.0 Removed in 5.5
T{
.BR accept (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
-T}
-\fBaccept4\fP(2) 2.6.28
-\fBaccess\fP(2) 1.0
-\fBacct\fP(2) 1.0
-\fBadd_key\fP(2) 2.6.10
-\fBadjtimex\fP(2) 1.0
-\fBalarm\fP(2) 1.0
-\fBalloc_hugepages\fP(2) 2.5.36 Removed in 2.5.44
+See notes on \f[B]socketcall\f[](2)
+T}
+\f[B]accept4\f[](2) 2.6.28
+\f[B]access\f[](2) 1.0
+\f[B]acct\f[](2) 1.0
+\f[B]add_key\f[](2) 2.6.10
+\f[B]adjtimex\f[](2) 1.0
+\f[B]alarm\f[](2) 1.0
+\f[B]alloc_hugepages\f[](2) 2.5.36 Removed in 2.5.44
.\" 4adeefe161a74369e44cc8e663f240ece0470dc3
-\fBarc_gettls\fP(2) 3.9 ARC only
-\fBarc_settls\fP(2) 3.9 ARC only
+\f[B]arc_gettls\f[](2) 3.9 ARC only
+\f[B]arc_settls\f[](2) 3.9 ARC only
.\" 91e040a79df73d371f70792f30380d4e44805250
-\fBarc_usr_cmpxchg\fP(2) 4.9 ARC only
+\f[B]arc_usr_cmpxchg\f[](2) 4.9 ARC only
.\" x86: 79170fda313ed5be2394f87aa2a00d597f8ed4a1
T{
.BR arch_prctl (2)
x86_64, x86 since 4.12
T}
.\" 9674cdc74d63f346870943ef966a034f8c71ee57
-\fBatomic_barrier\fP(2) 2.6.34 m68k only
-\fBatomic_cmpxchg_32\fP(2) 2.6.34 m68k only
+\f[B]atomic_barrier\f[](2) 2.6.34 m68k only
+\f[B]atomic_cmpxchg_32\f[](2) 2.6.34 m68k only
T{
.BR bdflush (2)
T} 1.2 T{
T{
.BR bind (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBbpf\fP(2) 3.18
-\fBbrk\fP(2) 1.0
+\f[B]bpf\f[](2) 3.18
+\f[B]brk\f[](2) 1.0
T{
.BR breakpoint (2)
T} 2.2 T{
ARM OABI only, defined with
-\fB__ARM_NR\fP prefix
+\f[B]__ARM_NR\f[] prefix
T}
-\fBcacheflush\fP(2) 1.2 Not on x86
-\fBcapget\fP(2) 2.2
-\fBcapset\fP(2) 2.2
-\fBchdir\fP(2) 1.0
-\fBchmod\fP(2) 1.0
+\f[B]cacheflush\f[](2) 1.2 Not on x86
+\f[B]capget\f[](2) 2.2
+\f[B]capset\f[](2) 2.2
+\f[B]chdir\f[](2) 1.0
+\f[B]chmod\f[](2) 1.0
T{
.BR chown (2)
T} 2.2 T{
for
version details
T}
-\fBchown32\fP(2) 2.4
-\fBchroot\fP(2) 1.0
-\fBclock_adjtime\fP(2) 2.6.39
-\fBclock_getres\fP(2) 2.6
-\fBclock_gettime\fP(2) 2.6
-\fBclock_nanosleep\fP(2) 2.6
-\fBclock_settime\fP(2) 2.6
-\fBclone2\fP(2) 2.4 IA-64 only
-\fBclone\fP(2) 1.0
-\fBclone3\fP(2) 5.3
-\fBclose\fP(2) 1.0
-\fBclose_range\fP(2) 5.9
+\f[B]chown32\f[](2) 2.4
+\f[B]chroot\f[](2) 1.0
+\f[B]clock_adjtime\f[](2) 2.6.39
+\f[B]clock_getres\f[](2) 2.6
+\f[B]clock_gettime\f[](2) 2.6
+\f[B]clock_nanosleep\f[](2) 2.6
+\f[B]clock_settime\f[](2) 2.6
+\f[B]clone2\f[](2) 2.4 IA-64 only
+\f[B]clone\f[](2) 1.0
+\f[B]clone3\f[](2) 5.3
+\f[B]close\f[](2) 1.0
+\f[B]close_range\f[](2) 5.9
.\" .\" dcef1f634657dabe7905af3ccda12cf7f0b6fcc1
.\" .\" cc20d42986d5807cbe4f5c7c8e3dab2e59ea0db3
.\" .\" db695c0509d6ec9046ee5e4c520a19fa17d9fce2
-.\" \fBcmpxchg\fP(2) 2.6.12 T{
+.\" \f[B]cmpxchg\f[](2) 2.6.12 T{
.\" ARM, syscall constant never was
.\" exposed to user space, in-kernel
-.\" definition had \fB__ARM_NR\fP prefix,
+.\" definition had \f[B]__ARM_NR\f[] prefix,
.\" removed in 4.4
.\" T}
.\" 867e359b97c970a60626d5d76bbe2a8fadbf38fb
T{
.BR connect (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBcopy_file_range\fP(2) 4.5
-\fBcreat\fP(2) 1.0
-\fBcreate_module\fP(2) 1.0 Removed in 2.6
-\fBdelete_module\fP(2) 1.0
+\f[B]copy_file_range\f[](2) 4.5
+\f[B]creat\f[](2) 1.0
+\f[B]create_module\f[](2) 1.0 Removed in 2.6
+\f[B]delete_module\f[](2) 1.0
.\" 1394f03221790a988afc3e4b3cb79f2e477246a9
.\" 4ba66a9760722ccbb691b8f7116cad2f791cca7b
-\fBdup\fP(2) 1.0
-\fBdup2\fP(2) 1.0
-\fBdup3\fP(2) 2.6.27
-\fBepoll_create\fP(2) 2.6
-\fBepoll_create1\fP(2) 2.6.27
-\fBepoll_ctl\fP(2) 2.6
-\fBepoll_pwait\fP(2) 2.6.19
-\fBepoll_pwait2\fP(2) 5.11
-\fBepoll_wait\fP(2) 2.6
-\fBeventfd\fP(2) 2.6.22
-\fBeventfd2\fP(2) 2.6.27
+\f[B]dup\f[](2) 1.0
+\f[B]dup2\f[](2) 1.0
+\f[B]dup3\f[](2) 2.6.27
+\f[B]epoll_create\f[](2) 2.6
+\f[B]epoll_create1\f[](2) 2.6.27
+\f[B]epoll_ctl\f[](2) 2.6
+\f[B]epoll_pwait\f[](2) 2.6.19
+\f[B]epoll_pwait2\f[](2) 5.11
+\f[B]epoll_wait\f[](2) 2.6
+\f[B]eventfd\f[](2) 2.6.22
+\f[B]eventfd2\f[](2) 2.6.27
T{
.BR execv (2)
T} 2.0 T{
SPARC/SPARC64 only, for
compatibility with SunOS
T}
-\fBexecve\fP(2) 1.0
-\fBexecveat\fP(2) 3.19
-\fBexit\fP(2) 1.0
-\fBexit_group\fP(2) 2.6
-\fBfaccessat\fP(2) 2.6.16
-\fBfaccessat2\fP(2) 5.8
-\fBfadvise64\fP(2) 2.6
-.\" Implements \fBposix_fadvise\fP(2)
-\fBfadvise64_64\fP(2) 2.6
-\fBfallocate\fP(2) 2.6.23
-\fBfanotify_init\fP(2) 2.6.37
-\fBfanotify_mark\fP(2) 2.6.37
+\f[B]execve\f[](2) 1.0
+\f[B]execveat\f[](2) 3.19
+\f[B]exit\f[](2) 1.0
+\f[B]exit_group\f[](2) 2.6
+\f[B]faccessat\f[](2) 2.6.16
+\f[B]faccessat2\f[](2) 5.8
+\f[B]fadvise64\f[](2) 2.6
+.\" Implements \f[B]posix_fadvise\f[](2)
+\f[B]fadvise64_64\f[](2) 2.6
+\f[B]fallocate\f[](2) 2.6.23
+\f[B]fanotify_init\f[](2) 2.6.37
+\f[B]fanotify_mark\f[](2) 2.6.37
.\" The fanotify calls were added in Linux 2.6.36,
.\" but disabled while the API was finalized.
-\fBfchdir\fP(2) 1.0
-\fBfchmod\fP(2) 1.0
-\fBfchmodat\fP(2) 2.6.16
-\fBfchown\fP(2) 1.0
-\fBfchown32\fP(2) 2.4
-\fBfchownat\fP(2) 2.6.16
-\fBfcntl\fP(2) 1.0
-\fBfcntl64\fP(2) 2.4
-\fBfdatasync\fP(2) 2.0
-\fBfgetxattr\fP(2) 2.6; 2.4.18
-\fBfinit_module\fP(2) 3.8
-\fBflistxattr\fP(2) 2.6; 2.4.18
-\fBflock\fP(2) 2.0
-\fBfork\fP(2) 1.0
-\fBfree_hugepages\fP(2) 2.5.36 Removed in 2.5.44
-\fBfremovexattr\fP(2) 2.6; 2.4.18
-\fBfsconfig\fP(2) 5.2
-\fBfsetxattr\fP(2) 2.6; 2.4.18
-\fBfsmount\fP(2) 5.2
-\fBfsopen\fP(2) 5.2
-\fBfspick\fP(2) 5.2
-\fBfstat\fP(2) 1.0
-\fBfstat64\fP(2) 2.4
-\fBfstatat64\fP(2) 2.6.16
-\fBfstatfs\fP(2) 1.0
-\fBfstatfs64\fP(2) 2.6
-\fBfsync\fP(2) 1.0
-\fBftruncate\fP(2) 1.0
-\fBftruncate64\fP(2) 2.4
-\fBfutex\fP(2) 2.6
-\fBfutimesat\fP(2) 2.6.16
-\fBget_kernel_syms\fP(2) 1.0 Removed in 2.6
-\fBget_mempolicy\fP(2) 2.6.6
-\fBget_robust_list\fP(2) 2.6.17
-\fBget_thread_area\fP(2) 2.6
+\f[B]fchdir\f[](2) 1.0
+\f[B]fchmod\f[](2) 1.0
+\f[B]fchmodat\f[](2) 2.6.16
+\f[B]fchown\f[](2) 1.0
+\f[B]fchown32\f[](2) 2.4
+\f[B]fchownat\f[](2) 2.6.16
+\f[B]fcntl\f[](2) 1.0
+\f[B]fcntl64\f[](2) 2.4
+\f[B]fdatasync\f[](2) 2.0
+\f[B]fgetxattr\f[](2) 2.6; 2.4.18
+\f[B]finit_module\f[](2) 3.8
+\f[B]flistxattr\f[](2) 2.6; 2.4.18
+\f[B]flock\f[](2) 2.0
+\f[B]fork\f[](2) 1.0
+\f[B]free_hugepages\f[](2) 2.5.36 Removed in 2.5.44
+\f[B]fremovexattr\f[](2) 2.6; 2.4.18
+\f[B]fsconfig\f[](2) 5.2
+\f[B]fsetxattr\f[](2) 2.6; 2.4.18
+\f[B]fsmount\f[](2) 5.2
+\f[B]fsopen\f[](2) 5.2
+\f[B]fspick\f[](2) 5.2
+\f[B]fstat\f[](2) 1.0
+\f[B]fstat64\f[](2) 2.4
+\f[B]fstatat64\f[](2) 2.6.16
+\f[B]fstatfs\f[](2) 1.0
+\f[B]fstatfs64\f[](2) 2.6
+\f[B]fsync\f[](2) 1.0
+\f[B]ftruncate\f[](2) 1.0
+\f[B]ftruncate64\f[](2) 2.4
+\f[B]futex\f[](2) 2.6
+\f[B]futimesat\f[](2) 2.6.16
+\f[B]get_kernel_syms\f[](2) 1.0 Removed in 2.6
+\f[B]get_mempolicy\f[](2) 2.6.6
+\f[B]get_robust_list\f[](2) 2.6.17
+\f[B]get_thread_area\f[](2) 2.6
.\" 8fcd6c45f5a65621ec809b7866a3623e9a01d4ed
T{
.BR get_tls (2)
T} 4.15 T{
ARM OABI only, has
-\fB__ARM_NR\fP prefix
+\f[B]__ARM_NR\f[] prefix
T}
-\fBgetcpu\fP(2) 2.6.19
-\fBgetcwd\fP(2) 2.2
-\fBgetdents\fP(2) 2.0
-\fBgetdents64\fP(2) 2.4
+\f[B]getcpu\f[](2) 2.6.19
+\f[B]getcwd\f[](2) 2.2
+\f[B]getdents\f[](2) 2.0
+\f[B]getdents64\f[](2) 2.4
.\" parisc: 863722e856e64dae0e252b6bb546737c6c5626ce
T{
.BR getdomainname (2)
T} 2.2 T{
SPARC, SPARC64; available
-as \fBosf_getdomainname\fP(2)
+as \f[B]osf_getdomainname\f[](2)
on Alpha since Linux 2.0
T}
.\" ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16
T} 2.0 T{
SPARC (removed in 2.6.26),
available on Alpha as
-\fBosf_getdtablesize\fP(2)
-T}
-\fBgetegid\fP(2) 1.0
-\fBgetegid32\fP(2) 2.4
-\fBgeteuid\fP(2) 1.0
-\fBgeteuid32\fP(2) 2.4
-\fBgetgid\fP(2) 1.0
-\fBgetgid32\fP(2) 2.4
-\fBgetgroups\fP(2) 1.0
-\fBgetgroups32\fP(2) 2.4
+\f[B]osf_getdtablesize\f[](2)
+T}
+\f[B]getegid\f[](2) 1.0
+\f[B]getegid32\f[](2) 2.4
+\f[B]geteuid\f[](2) 1.0
+\f[B]geteuid32\f[](2) 2.4
+\f[B]getgid\f[](2) 1.0
+\f[B]getgid32\f[](2) 2.4
+\f[B]getgroups\f[](2) 1.0
+\f[B]getgroups32\f[](2) 2.4
.\" SPARC removal: ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16
T{
.BR gethostname (2)
Alpha, was available on
SPARC up to Linux 2.6.26
T}
-\fBgetitimer\fP(2) 1.0
+\f[B]getitimer\f[](2) 1.0
T{
.BR getpeername (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
T{
.BR getpagesize (2)
T} 2.0 T{
Alpha, SPARC/SPARC64 only
T}
-\fBgetpgid\fP(2) 1.0
-\fBgetpgrp\fP(2) 1.0
-\fBgetpid\fP(2) 1.0
-\fBgetppid\fP(2) 1.0
-\fBgetpriority\fP(2) 1.0
-\fBgetrandom\fP(2) 3.17
-\fBgetresgid\fP(2) 2.2
-\fBgetresgid32\fP(2) 2.4
-\fBgetresuid\fP(2) 2.2
-\fBgetresuid32\fP(2) 2.4
-\fBgetrlimit\fP(2) 1.0
-\fBgetrusage\fP(2) 1.0
-\fBgetsid\fP(2) 2.0
+\f[B]getpgid\f[](2) 1.0
+\f[B]getpgrp\f[](2) 1.0
+\f[B]getpid\f[](2) 1.0
+\f[B]getppid\f[](2) 1.0
+\f[B]getpriority\f[](2) 1.0
+\f[B]getrandom\f[](2) 3.17
+\f[B]getresgid\f[](2) 2.2
+\f[B]getresgid32\f[](2) 2.4
+\f[B]getresuid\f[](2) 2.2
+\f[B]getresuid32\f[](2) 2.4
+\f[B]getrlimit\f[](2) 1.0
+\f[B]getrusage\f[](2) 1.0
+\f[B]getsid\f[](2) 2.0
T{
.BR getsockname (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
T{
.BR getsockopt (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBgettid\fP(2) 2.4.11
-\fBgettimeofday\fP(2) 1.0
-\fBgetuid\fP(2) 1.0
-\fBgetuid32\fP(2) 2.4
+\f[B]gettid\f[](2) 2.4.11
+\f[B]gettimeofday\f[](2) 1.0
+\f[B]getuid\f[](2) 1.0
+\f[B]getuid32\f[](2) 2.4
T{
.BR getunwind (2)
T} 2.4.8 T{
IA-64 only; deprecated
T}
-\fBgetxattr\fP(2) 2.6; 2.4.18
+\f[B]getxattr\f[](2) 2.6; 2.4.18
T{
.BR getxgid (2)
T} 2.0 T{
T} 2.0 T{
Alpha only; see NOTES
T}
-\fBinit_module\fP(2) 1.0
-\fBinotify_add_watch\fP(2) 2.6.13
-\fBinotify_init\fP(2) 2.6.13
-\fBinotify_init1\fP(2) 2.6.27
-\fBinotify_rm_watch\fP(2) 2.6.13
-\fBio_cancel\fP(2) 2.6
-\fBio_destroy\fP(2) 2.6
-\fBio_getevents\fP(2) 2.6
-\fBio_pgetevents\fP(2) 4.18
-\fBio_setup\fP(2) 2.6
-\fBio_submit\fP(2) 2.6
-\fBio_uring_enter\fP(2) 5.1
-\fBio_uring_register\fP(2) 5.1
-\fBio_uring_setup\fP(2) 5.1
-\fBioctl\fP(2) 1.0
-\fBioperm\fP(2) 1.0
-\fBiopl\fP(2) 1.0
-\fBioprio_get\fP(2) 2.6.13
-\fBioprio_set\fP(2) 2.6.13
-\fBipc\fP(2) 1.0
+\f[B]init_module\f[](2) 1.0
+\f[B]inotify_add_watch\f[](2) 2.6.13
+\f[B]inotify_init\f[](2) 2.6.13
+\f[B]inotify_init1\f[](2) 2.6.27
+\f[B]inotify_rm_watch\f[](2) 2.6.13
+\f[B]io_cancel\f[](2) 2.6
+\f[B]io_destroy\f[](2) 2.6
+\f[B]io_getevents\f[](2) 2.6
+\f[B]io_pgetevents\f[](2) 4.18
+\f[B]io_setup\f[](2) 2.6
+\f[B]io_submit\f[](2) 2.6
+\f[B]io_uring_enter\f[](2) 5.1
+\f[B]io_uring_register\f[](2) 5.1
+\f[B]io_uring_setup\f[](2) 5.1
+\f[B]ioctl\f[](2) 1.0
+\f[B]ioperm\f[](2) 1.0
+\f[B]iopl\f[](2) 1.0
+\f[B]ioprio_get\f[](2) 2.6.13
+\f[B]ioprio_set\f[](2) 2.6.13
+\f[B]ipc\f[](2) 1.0
.\" Implements System V IPC calls
-\fBkcmp\fP(2) 3.5
-\fBkern_features\fP(2) 3.7 SPARC64 only
+\f[B]kcmp\f[](2) 3.5
+\f[B]kern_features\f[](2) 3.7 SPARC64 only
.\" FIXME . document kern_features():
.\" commit 517ffce4e1a03aea979fe3a18a3dd1761a24fafb
-\fBkexec_file_load\fP(2) 3.17
-\fBkexec_load\fP(2) 2.6.13
+\f[B]kexec_file_load\f[](2) 3.17
+\f[B]kexec_load\f[](2) 2.6.13
.\" The entry in the syscall table was reserved starting in 2.6.7
.\" Was named sys_kexec_load() from 2.6.7 to 2.6.16
-\fBkeyctl\fP(2) 2.6.10
-\fBkill\fP(2) 1.0
-\fBlandlock_add_rule\fP(2) 5.13
-\fBlandlock_create_ruleset\fP(2) 5.13
-\fBlandlock_restrict_self\fP(2) 5.13
+\f[B]keyctl\f[](2) 2.6.10
+\f[B]kill\f[](2) 1.0
+\f[B]landlock_add_rule\f[](2) 5.13
+\f[B]landlock_create_ruleset\f[](2) 5.13
+\f[B]landlock_restrict_self\f[](2) 5.13
T{
.BR lchown (2)
T} 1.0 T{
for
version details
T}
-\fBlchown32\fP(2) 2.4
-\fBlgetxattr\fP(2) 2.6; 2.4.18
-\fBlink\fP(2) 1.0
-\fBlinkat\fP(2) 2.6.16
+\f[B]lchown32\f[](2) 2.4
+\f[B]lgetxattr\f[](2) 2.6; 2.4.18
+\f[B]link\f[](2) 1.0
+\f[B]linkat\f[](2) 2.6.16
T{
.BR listen (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
-T}
-\fBlistxattr\fP(2) 2.6; 2.4.18
-\fBllistxattr\fP(2) 2.6; 2.4.18
-\fBlookup_dcookie\fP(2) 2.6
-\fBlremovexattr\fP(2) 2.6; 2.4.18
-\fBlseek\fP(2) 1.0
-\fBlsetxattr\fP(2) 2.6; 2.4.18
-\fBlstat\fP(2) 1.0
-\fBlstat64\fP(2) 2.4
-\fBmadvise\fP(2) 2.4
-\fBmbind\fP(2) 2.6.6
-\fBmemory_ordering\fP(2) 2.2 SPARC64 only
+See notes on \f[B]socketcall\f[](2)
+T}
+\f[B]listxattr\f[](2) 2.6; 2.4.18
+\f[B]llistxattr\f[](2) 2.6; 2.4.18
+\f[B]lookup_dcookie\f[](2) 2.6
+\f[B]lremovexattr\f[](2) 2.6; 2.4.18
+\f[B]lseek\f[](2) 1.0
+\f[B]lsetxattr\f[](2) 2.6; 2.4.18
+\f[B]lstat\f[](2) 1.0
+\f[B]lstat64\f[](2) 2.4
+\f[B]madvise\f[](2) 2.4
+\f[B]mbind\f[](2) 2.6.6
+\f[B]memory_ordering\f[](2) 2.2 SPARC64 only
.\" 26025bbfbba33a9425be1b89eccb4664ea4c17b6
.\" bb6fb6dfcc17cddac11ac295861f7608194447a7
-\fBmembarrier\fP(2) 3.17
-\fBmemfd_create\fP(2) 3.17
-\fBmemfd_secret\fP(2) 5.14
-\fBmigrate_pages\fP(2) 2.6.16
-\fBmincore\fP(2) 2.4
-\fBmkdir\fP(2) 1.0
-\fBmkdirat\fP(2) 2.6.16
-\fBmknod\fP(2) 1.0
-\fBmknodat\fP(2) 2.6.16
-\fBmlock\fP(2) 2.0
-\fBmlock2\fP(2) 4.4
-\fBmlockall\fP(2) 2.0
-\fBmmap\fP(2) 1.0
-\fBmmap2\fP(2) 2.4
-\fBmodify_ldt\fP(2) 1.0
-\fBmount\fP(2) 1.0
-\fBmove_mount\fP(2) 5.2
-\fBmove_pages\fP(2) 2.6.18
-\fBmprotect\fP(2) 1.0
-\fBmq_getsetattr\fP(2) 2.6.6
-.\" Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
-\fBmq_notify\fP(2) 2.6.6
-\fBmq_open\fP(2) 2.6.6
-\fBmq_timedreceive\fP(2) 2.6.6
-\fBmq_timedsend\fP(2) 2.6.6
-\fBmq_unlink\fP(2) 2.6.6
-\fBmremap\fP(2) 2.0
+\f[B]membarrier\f[](2) 3.17
+\f[B]memfd_create\f[](2) 3.17
+\f[B]memfd_secret\f[](2) 5.14
+\f[B]migrate_pages\f[](2) 2.6.16
+\f[B]mincore\f[](2) 2.4
+\f[B]mkdir\f[](2) 1.0
+\f[B]mkdirat\f[](2) 2.6.16
+\f[B]mknod\f[](2) 1.0
+\f[B]mknodat\f[](2) 2.6.16
+\f[B]mlock\f[](2) 2.0
+\f[B]mlock2\f[](2) 4.4
+\f[B]mlockall\f[](2) 2.0
+\f[B]mmap\f[](2) 1.0
+\f[B]mmap2\f[](2) 2.4
+\f[B]modify_ldt\f[](2) 1.0
+\f[B]mount\f[](2) 1.0
+\f[B]move_mount\f[](2) 5.2
+\f[B]move_pages\f[](2) 2.6.18
+\f[B]mprotect\f[](2) 1.0
+\f[B]mq_getsetattr\f[](2) 2.6.6
+.\" Implements \f[B]mq_getattr\f[](3) and \f[B]mq_setattr\f[](3)
+\f[B]mq_notify\f[](2) 2.6.6
+\f[B]mq_open\f[](2) 2.6.6
+\f[B]mq_timedreceive\f[](2) 2.6.6
+\f[B]mq_timedsend\f[](2) 2.6.6
+\f[B]mq_unlink\f[](2) 2.6.6
+\f[B]mremap\f[](2) 2.0
T{
.BR msgctl (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR msgget (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR msgrcv (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR msgsnd (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
-\fBmsync\fP(2) 2.0
-.\" \fBmultiplexer\fP(2) ?? __NR_multiplexer reserved on
+\f[B]msync\f[](2) 2.0
+.\" \f[B]multiplexer\f[](2) ?? __NR_multiplexer reserved on
.\" PowerPC, but unimplemented?
-\fBmunlock\fP(2) 2.0
-\fBmunlockall\fP(2) 2.0
-\fBmunmap\fP(2) 1.0
-\fBname_to_handle_at\fP(2) 2.6.39
-\fBnanosleep\fP(2) 2.0
+\f[B]munlock\f[](2) 2.0
+\f[B]munlockall\f[](2) 2.0
+\f[B]munmap\f[](2) 1.0
+\f[B]name_to_handle_at\f[](2) 2.6.39
+\f[B]nanosleep\f[](2) 2.0
.\" 5590ff0d5528b60153c0b4e7b771472b5a95e297
T{
.BR newfstatat (2)
T} 2.6.16 T{
-See \fBstat\fP(2)
+See \f[B]stat\f[](2)
T}
-\fBnfsservctl\fP(2) 2.2 Removed in 3.1
-\fBnice\fP(2) 1.0
+\f[B]nfsservctl\f[](2) 2.2 Removed in 3.1
+\f[B]nice\f[](2) 1.0
T{
.BR old_adjtimex (2)
T} 2.0 T{
T{
.BR old_getrlimit (2)
T} 2.4 T{
-Old variant of \fBgetrlimit\fP(2)
+Old variant of \f[B]getrlimit\f[](2)
that used a different value
-for \fBRLIM_INFINITY\fP
+for \f[B]RLIM_INFINITY\f[]
T}
-\fBoldfstat\fP(2) 1.0
-\fBoldlstat\fP(2) 1.0
-\fBoldolduname\fP(2) 1.0
-\fBoldstat\fP(2) 1.0
+\f[B]oldfstat\f[](2) 1.0
+\f[B]oldlstat\f[](2) 1.0
+\f[B]oldolduname\f[](2) 1.0
+\f[B]oldstat\f[](2) 1.0
T{
.BR oldumount (2)
T} 2.4.116 T{
-Name of the old \fBumount\fP(2)
+Name of the old \f[B]umount\f[](2)
syscall on Alpha
T}
-\fBolduname\fP(2) 1.0
-\fBopen\fP(2) 1.0
-\fBopen_by_handle_at\fP(2) 2.6.39
-\fBopen_tree\fP(2) 5.2
-\fBopenat\fP(2) 2.6.16
-\fBopenat2\fP(2) 5.6
+\f[B]olduname\f[](2) 1.0
+\f[B]open\f[](2) 1.0
+\f[B]open_by_handle_at\f[](2) 2.6.39
+\f[B]open_tree\f[](2) 5.2
+\f[B]openat\f[](2) 2.6.16
+\f[B]openat2\f[](2) 5.6
.\" 9d02a4283e9ce4e9ca11ff00615bdacdb0515a1a
T{
.BR or1k_atomic (2)
T} 3.1 T{
OpenRISC 1000 only
T}
-\fBpause\fP(2) 1.0
-\fBpciconfig_iobase\fP(2) 2.2.15; 2.4 Not on x86
+\f[B]pause\f[](2) 1.0
+\f[B]pciconfig_iobase\f[](2) 2.2.15; 2.4 Not on x86
.\" Alpha, PowerPC, ARM; not x86
-\fBpciconfig_read\fP(2) 2.0.26; 2.2 Not on x86
+\f[B]pciconfig_read\f[](2) 2.0.26; 2.2 Not on x86
.\" , PowerPC, ARM; not x86
-\fBpciconfig_write\fP(2) 2.0.26; 2.2 Not on x86
+\f[B]pciconfig_write\f[](2) 2.0.26; 2.2 Not on x86
.\" , PowerPC, ARM; not x86
T{
.BR perf_event_open (2)
Was perf_counter_open() in
2.6.31; renamed in 2.6.32
T}
-\fBpersonality\fP(2) 1.2
+\f[B]personality\f[](2) 1.2
T{
.BR perfctr (2)
T} 2.2 T{
SPARC only; removed in 2.6.34
T}
.\" commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr()
-\fBperfmonctl\fP(2) 2.4 IA-64 only; removed in 5.10
-\fBpidfd_getfd\fP(2) 5.6
-\fBpidfd_send_signal\fP(2) 5.1
-\fBpidfd_open\fP(2) 5.3
-\fBpipe\fP(2) 1.0
-\fBpipe2\fP(2) 2.6.27
-\fBpivot_root\fP(2) 2.4
-\fBpkey_alloc\fP(2) 4.8
-\fBpkey_free\fP(2) 4.8
-\fBpkey_mprotect\fP(2) 4.8
-\fBpoll\fP(2) 2.0.36; 2.2
-\fBppoll\fP(2) 2.6.16
-\fBprctl\fP(2) 2.2
+\f[B]perfmonctl\f[](2) 2.4 IA-64 only; removed in 5.10
+\f[B]pidfd_getfd\f[](2) 5.6
+\f[B]pidfd_send_signal\f[](2) 5.1
+\f[B]pidfd_open\f[](2) 5.3
+\f[B]pipe\f[](2) 1.0
+\f[B]pipe2\f[](2) 2.6.27
+\f[B]pivot_root\f[](2) 2.4
+\f[B]pkey_alloc\f[](2) 4.8
+\f[B]pkey_free\f[](2) 4.8
+\f[B]pkey_mprotect\f[](2) 4.8
+\f[B]poll\f[](2) 2.0.36; 2.2
+\f[B]ppoll\f[](2) 2.6.16
+\f[B]prctl\f[](2) 2.2
T{
.BR pread64 (2)
T} T{
Added as "pread" in 2.2;
renamed "pread64" in 2.6
T}
-\fBpreadv\fP(2) 2.6.30
-\fBpreadv2\fP(2) 4.6
-\fBprlimit64\fP(2) 2.6.36
-\fBprocess_madvise\fP(2) 5.10
-\fBprocess_vm_readv\fP(2) 3.2
-\fBprocess_vm_writev\fP(2) 3.2
-\fBpselect6\fP(2) 2.6.16
-.\" Implements \fBpselect\fP(2)
-\fBptrace\fP(2) 1.0
+\f[B]preadv\f[](2) 2.6.30
+\f[B]preadv2\f[](2) 4.6
+\f[B]prlimit64\f[](2) 2.6.36
+\f[B]process_madvise\f[](2) 5.10
+\f[B]process_vm_readv\f[](2) 3.2
+\f[B]process_vm_writev\f[](2) 3.2
+\f[B]pselect6\f[](2) 2.6.16
+.\" Implements \f[B]pselect\f[](2)
+\f[B]ptrace\f[](2) 1.0
T{
.BR pwrite64 (2)
T} T{
Added as "pwrite" in 2.2;
renamed "pwrite64" in 2.6
T}
-\fBpwritev\fP(2) 2.6.30
-\fBpwritev2\fP(2) 4.6
-\fBquery_module\fP(2) 2.2 Removed in 2.6
-\fBquotactl\fP(2) 1.0
-\fBquotactl_fd\fP(2) 5.14
-\fBread\fP(2) 1.0
-\fBreadahead\fP(2) 2.4.13
-\fBreaddir\fP(2) 1.0
-.\" Supersedes \fBgetdents\fP(2)
-\fBreadlink\fP(2) 1.0
-\fBreadlinkat\fP(2) 2.6.16
-\fBreadv\fP(2) 2.0
-\fBreboot\fP(2) 1.0
+\f[B]pwritev\f[](2) 2.6.30
+\f[B]pwritev2\f[](2) 4.6
+\f[B]query_module\f[](2) 2.2 Removed in 2.6
+\f[B]quotactl\f[](2) 1.0
+\f[B]quotactl_fd\f[](2) 5.14
+\f[B]read\f[](2) 1.0
+\f[B]readahead\f[](2) 2.4.13
+\f[B]readdir\f[](2) 1.0
+.\" Supersedes \f[B]getdents\f[](2)
+\f[B]readlink\f[](2) 1.0
+\f[B]readlinkat\f[](2) 2.6.16
+\f[B]readv\f[](2) 2.0
+\f[B]reboot\f[](2) 1.0
T{
.BR recv (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
T{
.BR recvfrom (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
T{
.BR recvmsg (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBrecvmmsg\fP(2) 2.6.33
+\f[B]recvmmsg\f[](2) 2.6.33
T{
.BR remap_file_pages (2)
T} 2.6 T{
Deprecated since 3.16
T}
-\fBremovexattr\fP(2) 2.6; 2.4.18
-\fBrename\fP(2) 1.0
-\fBrenameat\fP(2) 2.6.16
-\fBrenameat2\fP(2) 3.15
-\fBrequest_key\fP(2) 2.6.10
-\fBrestart_syscall\fP(2) 2.6
+\f[B]removexattr\f[](2) 2.6; 2.4.18
+\f[B]rename\f[](2) 1.0
+\f[B]renameat\f[](2) 2.6.16
+\f[B]renameat2\f[](2) 3.15
+\f[B]request_key\f[](2) 2.6.10
+\f[B]restart_syscall\f[](2) 2.6
.\" 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054
-\fBriscv_flush_icache\fP(2) 4.15 RISC-V only
-\fBrmdir\fP(2) 1.0
-\fBrseq\fP(2) 4.18
-\fBrt_sigaction\fP(2) 2.2
-\fBrt_sigpending\fP(2) 2.2
-\fBrt_sigprocmask\fP(2) 2.2
-\fBrt_sigqueueinfo\fP(2) 2.2
-\fBrt_sigreturn\fP(2) 2.2
-\fBrt_sigsuspend\fP(2) 2.2
-\fBrt_sigtimedwait\fP(2) 2.2
-\fBrt_tgsigqueueinfo\fP(2) 2.6.31
+\f[B]riscv_flush_icache\f[](2) 4.15 RISC-V only
+\f[B]rmdir\f[](2) 1.0
+\f[B]rseq\f[](2) 4.18
+\f[B]rt_sigaction\f[](2) 2.2
+\f[B]rt_sigpending\f[](2) 2.2
+\f[B]rt_sigprocmask\f[](2) 2.2
+\f[B]rt_sigqueueinfo\f[](2) 2.2
+\f[B]rt_sigreturn\f[](2) 2.2
+\f[B]rt_sigsuspend\f[](2) 2.2
+\f[B]rt_sigtimedwait\f[](2) 2.2
+\f[B]rt_tgsigqueueinfo\f[](2) 2.6.31
T{
.BR rtas (2)
T} 2.6.2 T{
PowerPC/PowerPC64 only
T}
-\fBs390_runtime_instr\fP(2) 3.7 s390 only
-\fBs390_pci_mmio_read\fP(2) 3.19 s390 only
-\fBs390_pci_mmio_write\fP(2) 3.19 s390 only
-\fBs390_sthyi\fP(2) 4.15 s390 only
-\fBs390_guarded_storage\fP(2) 4.12 s390 only
+\f[B]s390_runtime_instr\f[](2) 3.7 s390 only
+\f[B]s390_pci_mmio_read\f[](2) 3.19 s390 only
+\f[B]s390_pci_mmio_write\f[](2) 3.19 s390 only
+\f[B]s390_sthyi\f[](2) 4.15 s390 only
+\f[B]s390_guarded_storage\f[](2) 4.12 s390 only
T{
.BR sched_get_affinity (2)
T} 2.6 T{
.BR \%sched_getaffinity (2)
on SPARC and SPARC64
T}
-\fBsched_get_priority_max\fP(2) 2.0
-\fBsched_get_priority_min\fP(2) 2.0
-\fBsched_getaffinity\fP(2) 2.6
-\fBsched_getattr\fP(2) 3.14
-\fBsched_getparam\fP(2) 2.0
-\fBsched_getscheduler\fP(2) 2.0
-\fBsched_rr_get_interval\fP(2) 2.0
+\f[B]sched_get_priority_max\f[](2) 2.0
+\f[B]sched_get_priority_min\f[](2) 2.0
+\f[B]sched_getaffinity\f[](2) 2.6
+\f[B]sched_getattr\f[](2) 3.14
+\f[B]sched_getparam\f[](2) 2.0
+\f[B]sched_getscheduler\f[](2) 2.0
+\f[B]sched_rr_get_interval\f[](2) 2.0
T{
.BR sched_set_affinity (2)
T} 2.6 T{
.BR \%sched_setaffinity (2)
on SPARC and SPARC64
T}
-\fBsched_setaffinity\fP(2) 2.6
-\fBsched_setattr\fP(2) 3.14
-\fBsched_setparam\fP(2) 2.0
-\fBsched_setscheduler\fP(2) 2.0
-\fBsched_yield\fP(2) 2.0
-\fBseccomp\fP(2) 3.17
-\fBselect\fP(2) 1.0
+\f[B]sched_setaffinity\f[](2) 2.6
+\f[B]sched_setattr\f[](2) 3.14
+\f[B]sched_setparam\f[](2) 2.0
+\f[B]sched_setscheduler\f[](2) 2.0
+\f[B]sched_yield\f[](2) 2.0
+\f[B]seccomp\f[](2) 3.17
+\f[B]select\f[](2) 1.0
T{
.BR semctl (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR semget (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR semop (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
-\fBsemtimedop\fP(2) 2.6; 2.4.22
+\f[B]semtimedop\f[](2) 2.6; 2.4.22
T{
.BR send (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBsendfile\fP(2) 2.2
-\fBsendfile64\fP(2) 2.6; 2.4.19
-\fBsendmmsg\fP(2) 3.0
+\f[B]sendfile\f[](2) 2.2
+\f[B]sendfile64\f[](2) 2.6; 2.4.19
+\f[B]sendmmsg\f[](2) 3.0
T{
.BR sendmsg (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
T{
.BR sendto (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBset_mempolicy\fP(2) 2.6.6
-\fBset_robust_list\fP(2) 2.6.17
-\fBset_thread_area\fP(2) 2.6
-\fBset_tid_address\fP(2) 2.6
+\f[B]set_mempolicy\f[](2) 2.6.6
+\f[B]set_robust_list\f[](2) 2.6.17
+\f[B]set_thread_area\f[](2) 2.6
+\f[B]set_tid_address\f[](2) 2.6
T{
.BR set_tls (2)
T} 2.6.11 T{
ARM OABI/EABI only (constant
-has \fB__ARM_NR\fP prefix)
+has \f[B]__ARM_NR\f[] prefix)
T}
-.\" \fBsetaltroot\fP(2) 2.6.10 T{
+.\" \f[B]setaltroot\f[](2) 2.6.10 T{
.\" Removed in 2.6.11, exposed one
.\" of implementation details of
-.\" \fBpersonality\fP(2) (creating an
+.\" \f[B]personality\f[](2) (creating an
.\" alternative root, precursor of
.\" mount namespaces) to user space.
.\" T}
.\" See http://lkml.org/lkml/2005/8/1/83
.\" "[PATCH] remove sys_set_zone_reclaim()"
-\fBsetdomainname\fP(2) 1.0
-\fBsetfsgid\fP(2) 1.2
-\fBsetfsgid32\fP(2) 2.4
-\fBsetfsuid\fP(2) 1.2
-\fBsetfsuid32\fP(2) 2.4
-\fBsetgid\fP(2) 1.0
-\fBsetgid32\fP(2) 2.4
-\fBsetgroups\fP(2) 1.0
-\fBsetgroups32\fP(2) 2.4
+\f[B]setdomainname\f[](2) 1.0
+\f[B]setfsgid\f[](2) 1.2
+\f[B]setfsgid32\f[](2) 2.4
+\f[B]setfsuid\f[](2) 1.2
+\f[B]setfsuid32\f[](2) 2.4
+\f[B]setgid\f[](2) 1.0
+\f[B]setgid32\f[](2) 2.4
+\f[B]setgroups\f[](2) 1.0
+\f[B]setgroups32\f[](2) 2.4
.\" arch/alpha/include/asm/core_lca.h
T{
.BR sethae (2)
T} 2.0 T{
Alpha only; see NOTES
T}
-\fBsethostname\fP(2) 1.0
-\fBsetitimer\fP(2) 1.0
-\fBsetns\fP(2) 3.0
-\fBsetpgid\fP(2) 1.0
+\f[B]sethostname\f[](2) 1.0
+\f[B]setitimer\f[](2) 1.0
+\f[B]setns\f[](2) 3.0
+\f[B]setpgid\f[](2) 1.0
T{
.BR setpgrp (2)
T} 2.0 T{
.BR setpgid (2)
on Alpha
T}
-\fBsetpriority\fP(2) 1.0
-\fBsetregid\fP(2) 1.0
-\fBsetregid32\fP(2) 2.4
-\fBsetresgid\fP(2) 2.2
-\fBsetresgid32\fP(2) 2.4
-\fBsetresuid\fP(2) 2.2
-\fBsetresuid32\fP(2) 2.4
-\fBsetreuid\fP(2) 1.0
-\fBsetreuid32\fP(2) 2.4
-\fBsetrlimit\fP(2) 1.0
-\fBsetsid\fP(2) 1.0
+\f[B]setpriority\f[](2) 1.0
+\f[B]setregid\f[](2) 1.0
+\f[B]setregid32\f[](2) 2.4
+\f[B]setresgid\f[](2) 2.2
+\f[B]setresgid32\f[](2) 2.4
+\f[B]setresuid\f[](2) 2.2
+\f[B]setresuid32\f[](2) 2.4
+\f[B]setreuid\f[](2) 1.0
+\f[B]setreuid32\f[](2) 2.4
+\f[B]setrlimit\f[](2) 1.0
+\f[B]setsid\f[](2) 1.0
T{
.BR setsockopt (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBsettimeofday\fP(2) 1.0
-\fBsetuid\fP(2) 1.0
-\fBsetuid32\fP(2) 2.4
-\fBsetup\fP(2) 1.0 Removed in 2.2
-\fBsetxattr\fP(2) 2.6; 2.4.18
-\fBsgetmask\fP(2) 1.0
+\f[B]settimeofday\f[](2) 1.0
+\f[B]setuid\f[](2) 1.0
+\f[B]setuid32\f[](2) 2.4
+\f[B]setup\f[](2) 1.0 Removed in 2.2
+\f[B]setxattr\f[](2) 2.6; 2.4.18
+\f[B]sgetmask\f[](2) 1.0
T{
.BR shmat (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR shmctl (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR shmdt (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR shmget (2)
T} 2.0 T{
-See notes on \fBipc\fP(2)
+See notes on \f[B]ipc\f[](2)
T}
T{
.BR shutdown (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
-T}
-\fBsigaction\fP(2) 1.0
-\fBsigaltstack\fP(2) 2.2
-\fBsignal\fP(2) 1.0
-\fBsignalfd\fP(2) 2.6.22
-\fBsignalfd4\fP(2) 2.6.27
-\fBsigpending\fP(2) 1.0
-\fBsigprocmask\fP(2) 1.0
-\fBsigreturn\fP(2) 1.0
-\fBsigsuspend\fP(2) 1.0
+See notes on \f[B]socketcall\f[](2)
+T}
+\f[B]sigaction\f[](2) 1.0
+\f[B]sigaltstack\f[](2) 2.2
+\f[B]signal\f[](2) 1.0
+\f[B]signalfd\f[](2) 2.6.22
+\f[B]signalfd4\f[](2) 2.6.27
+\f[B]sigpending\f[](2) 1.0
+\f[B]sigprocmask\f[](2) 1.0
+\f[B]sigreturn\f[](2) 1.0
+\f[B]sigsuspend\f[](2) 1.0
T{
.BR socket (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
-\fBsocketcall\fP(2) 1.0
+\f[B]socketcall\f[](2) 1.0
.\" Implements BSD socket calls
T{
.BR socketpair (2)
T} 2.0 T{
-See notes on \fBsocketcall\fP(2)
+See notes on \f[B]socketcall\f[](2)
T}
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
-\fBspill\fP(2) 2.6.13 Xtensa only
-\fBsplice\fP(2) 2.6.17
+\f[B]spill\f[](2) 2.6.13 Xtensa only
+\f[B]splice\f[](2) 2.6.17
T{
.BR spu_create (2)
T} 2.6.16 T{
T} 2.6.16 T{
PowerPC/PowerPC64 only
T}
-\fBssetmask\fP(2) 1.0
-\fBstat\fP(2) 1.0
-\fBstat64\fP(2) 2.4
-\fBstatfs\fP(2) 1.0
-\fBstatfs64\fP(2) 2.6
-\fBstatx\fP(2) 4.11
-\fBstime\fP(2) 1.0
+\f[B]ssetmask\f[](2) 1.0
+\f[B]stat\f[](2) 1.0
+\f[B]stat64\f[](2) 2.4
+\f[B]statfs\f[](2) 1.0
+\f[B]statfs64\f[](2) 2.6
+\f[B]statx\f[](2) 4.11
+\f[B]stime\f[](2) 1.0
T{
.BR subpage_prot (2)
T} 2.6.25 T{
PowerPC/PowerPC64 only
T}
.\" 529d235a0e190ded1d21ccc80a73e625ebcad09b
-\fBswitch_endian\fP(2) 4.1 PowerPC64 only
-\fBswapoff\fP(2) 1.0
-\fBswapon\fP(2) 1.0
-\fBsymlink\fP(2) 1.0
-\fBsymlinkat\fP(2) 2.6.16
-\fBsync\fP(2) 1.0
-\fBsync_file_range\fP(2) 2.6.17
-\fBsync_file_range2\fP(2) 2.6.22
+\f[B]switch_endian\f[](2) 4.1 PowerPC64 only
+\f[B]swapoff\f[](2) 1.0
+\f[B]swapon\f[](2) 1.0
+\f[B]symlink\f[](2) 1.0
+\f[B]symlinkat\f[](2) 2.6.16
+\f[B]sync\f[](2) 1.0
+\f[B]sync_file_range\f[](2) 2.6.17
+\f[B]sync_file_range2\f[](2) 2.6.22
.\" PowerPC, ARM, tile
.\" First appeared on ARM, as arm_sync_file_range(), but later renamed
-.\" \fBsys_debug_setcontext\fP(2) ??? PowerPC if CONFIG_PPC32
-\fBsyncfs\fP(2) 2.6.39
-\fBsys_debug_setcontext\fP(2) 2.6.11 PowerPC only
+.\" \f[B]sys_debug_setcontext\f[](2) ??? PowerPC if CONFIG_PPC32
+\f[B]syncfs\f[](2) 2.6.39
+\f[B]sys_debug_setcontext\f[](2) 2.6.11 PowerPC only
T{
.BR syscall (2)
T} 1.0 T{
Still available on ARM OABI
and MIPS O32 ABI
T}
-\fBsysfs\fP(2) 1.2
-\fBsysinfo\fP(2) 1.0
-\fBsyslog\fP(2) 1.0
-.\" glibc interface is \fBklogctl\fP(3)
-\fBsysmips\fP(2) 2.6.0 MIPS only
-\fBtee\fP(2) 2.6.17
-\fBtgkill\fP(2) 2.6
-\fBtime\fP(2) 1.0
-\fBtimer_create\fP(2) 2.6
-\fBtimer_delete\fP(2) 2.6
-\fBtimer_getoverrun\fP(2) 2.6
-\fBtimer_gettime\fP(2) 2.6
-\fBtimer_settime\fP(2) 2.6
+\f[B]sysfs\f[](2) 1.2
+\f[B]sysinfo\f[](2) 1.0
+\f[B]syslog\f[](2) 1.0
+.\" glibc interface is \f[B]klogctl\f[](3)
+\f[B]sysmips\f[](2) 2.6.0 MIPS only
+\f[B]tee\f[](2) 2.6.17
+\f[B]tgkill\f[](2) 2.6
+\f[B]time\f[](2) 1.0
+\f[B]timer_create\f[](2) 2.6
+\f[B]timer_delete\f[](2) 2.6
+\f[B]timer_getoverrun\f[](2) 2.6
+\f[B]timer_gettime\f[](2) 2.6
+\f[B]timer_settime\f[](2) 2.6
.\" .\" b215e283992899650c4271e7385c79e26fb9a88e
.\" .\" 4d672e7ac79b5ec5cdc90e450823441e20464691
-.\" \fBtimerfd\fP(2) 2.6.22 T{
+.\" \f[B]timerfd\f[](2) 2.6.22 T{
.\" Old timerfd interface,
.\" removed in 2.6.25
.\" T}
-\fBtimerfd_create\fP(2) 2.6.25
-\fBtimerfd_gettime\fP(2) 2.6.25
-\fBtimerfd_settime\fP(2) 2.6.25
-\fBtimes\fP(2) 1.0
-\fBtkill\fP(2) 2.6; 2.4.22
-\fBtruncate\fP(2) 1.0
-\fBtruncate64\fP(2) 2.4
-\fBugetrlimit\fP(2) 2.4
-\fBumask\fP(2) 1.0
-\fBumount\fP(2) 1.0
+\f[B]timerfd_create\f[](2) 2.6.25
+\f[B]timerfd_gettime\f[](2) 2.6.25
+\f[B]timerfd_settime\f[](2) 2.6.25
+\f[B]times\f[](2) 1.0
+\f[B]tkill\f[](2) 2.6; 2.4.22
+\f[B]truncate\f[](2) 1.0
+\f[B]truncate64\f[](2) 2.4
+\f[B]ugetrlimit\f[](2) 2.4
+\f[B]umask\f[](2) 1.0
+\f[B]umount\f[](2) 1.0
.\" sys_oldumount() -- __NR_umount
-\fBumount2\fP(2) 2.2
+\f[B]umount2\f[](2) 2.2
.\" sys_umount() -- __NR_umount2
-\fBuname\fP(2) 1.0
-\fBunlink\fP(2) 1.0
-\fBunlinkat\fP(2) 2.6.16
-\fBunshare\fP(2) 2.6.16
-\fBuselib\fP(2) 1.0
-\fBustat\fP(2) 1.0
-\fBuserfaultfd\fP(2) 4.3
-\fBusr26\fP(2) 2.4.8.1 ARM OABI only
-\fBusr32\fP(2) 2.4.8.1 ARM OABI only
-\fButime\fP(2) 1.0
-\fButimensat\fP(2) 2.6.22
-\fButimes\fP(2) 2.2
-\fButrap_install\fP(2) 2.2 SPARC64 only
+\f[B]uname\f[](2) 1.0
+\f[B]unlink\f[](2) 1.0
+\f[B]unlinkat\f[](2) 2.6.16
+\f[B]unshare\f[](2) 2.6.16
+\f[B]uselib\f[](2) 1.0
+\f[B]ustat\f[](2) 1.0
+\f[B]userfaultfd\f[](2) 4.3
+\f[B]usr26\f[](2) 2.4.8.1 ARM OABI only
+\f[B]usr32\f[](2) 2.4.8.1 ARM OABI only
+\f[B]utime\f[](2) 1.0
+\f[B]utimensat\f[](2) 2.6.22
+\f[B]utimes\f[](2) 2.2
+\f[B]utrap_install\f[](2) 2.2 SPARC64 only
.\" FIXME . document utrap_install()
.\" There's a man page for Solaris 5.11
-\fBvfork\fP(2) 2.2
-\fBvhangup\fP(2) 1.0
+\f[B]vfork\f[](2) 2.2
+\f[B]vhangup\f[](2) 1.0
T{
.BR vm86old (2)
T} 1.0 T{
Was "vm86"; renamed in
2.0.28/2.2
T}
-\fBvm86\fP(2) 2.0.28; 2.2
-\fBvmsplice\fP(2) 2.6.17
-\fBwait4\fP(2) 1.0
-\fBwaitid\fP(2) 2.6.10
-\fBwaitpid\fP(2) 1.0
-\fBwrite\fP(2) 1.0
-\fBwritev\fP(2) 2.0
+\f[B]vm86\f[](2) 2.0.28; 2.2
+\f[B]vmsplice\f[](2) 2.6.17
+\f[B]wait4\f[](2) 1.0
+\f[B]waitid\f[](2) 2.6.10
+\f[B]waitpid\f[](2) 1.0
+\f[B]write\f[](2) 1.0
+\f[B]writev\f[](2) 2.0
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
-\fBxtensa\fP(2) 2.6.13 Xtensa only
+\f[B]xtensa\f[](2) 2.6.13 Xtensa only
.TE
.P
On many platforms, including x86-32, socket calls are all multiplexed
.TP
.BR getxgid (2)
returns a pair of GID and effective GID via registers
-\fBr0\fP and \fBr20\fP; it is provided
+.B r0
+and
+.BR r20 ;
+it is provided
instead of
-\fBgetgid\fP(2) and \fBgetegid\fP(2).
+.BR getgid (2)
+and
+.BR getegid (2).
.TP
.BR getxpid (2)
returns a pair of PID and parent PID via registers
-\fBr0\fP and \fBr20\fP; it is provided instead of
-\fBgetpid\fP(2) and \fBgetppid\fP(2).
+.B r0
+and
+.BR r20 ;
+it is provided instead of
+.BR getpid (2)
+and
+.BR getppid (2).
.TP
.BR old_adjtimex (2)
-is a variant of \fBadjtimex\fP(2) that uses \fIstruct timeval32\fP,
+is a variant of
+.BR adjtimex (2)
+that uses
+.IR "struct\ timeval32" ,
for compatibility with OSF/1.
.TP
.BR getxuid (2)
returns a pair of GID and effective GID via registers
-\fBr0\fP and \fBr20\fP; it is provided instead of
-\fBgetuid\fP(2) and \fBgeteuid\fP(2).
+.B r0
+and
+.BR r20 ;
+it is provided instead of
+.BR getuid (2)
+and
+.BR geteuid (2).
.TP
.BR sethae (2)
is used for configuring the Host Address Extension register on
use that interface instead.
.SH BUGS
There is no libc or glibc support.
-There is no way to guess how large \fIbuf\fP should be.
+There is no way to guess how large
+.I buf
+should be.
.SH SEE ALSO
.BR proc (5),
.BR sysfs (5)
.\" For Linux 2.6, precisely the option seems to have appeared in Linux 2.5.55.
Since Linux 2.6.6, the size can be queried with command type 10 (see below).
.SS Commands
-The \fItype\fP argument determines the action taken by this function.
+The
+.I type
+argument determines the action taken by this function.
The list below specifies the values for
.IR type .
The symbolic names are defined in the kernel source,
Read from the log.
The call
waits until the kernel log buffer is nonempty, and then reads
-at most \fIlen\fP bytes into the buffer pointed to by
+at most
+.I len
+bytes into the buffer pointed to by
.IR bufp .
The call returns the number of bytes read.
Bytes read from the log disappear from the log buffer:
Read all messages remaining in the ring buffer,
placing them in the buffer pointed to by
.IR bufp .
-The call reads the last \fIlen\fP
+The call reads the last
+.I len
bytes from the log buffer (nondestructively),
but will not read more than was written into the buffer since the
last "clear ring buffer" command (see command 5 below)).
console only if it has a log level less than the value of
.IR console_loglevel .
.SH RETURN VALUE
-For \fItype\fP equal to 2, 3, or 4, a successful call to
+For
+.I type
+equal to 2, 3, or 4, a successful call to
.BR syslog ()
returns the number
of bytes read.
-For \fItype\fP 9,
+For
+.I type
+9,
.BR syslog ()
returns the number of bytes currently
available to be read on the kernel log buffer.
-For \fItype\fP 10,
+For
+.I type
+10,
.BR syslog ()
returns the total size of the kernel log buffer.
-For other values of \fItype\fP, 0 is returned on success.
+For other values of
+.IR type ,
+0 is returned on success.
.P
In case of error, \-1 is returned,
-and \fIerrno\fP is set to indicate the error.
+and
+.I errno
+is set to indicate the error.
.SH ERRORS
.TP
.B EINVAL
.P
.in +4n
.EX
-$ \fBdate | ./a.out out.log | cat\fP
+.RB $ " date | ./a.out out.log | cat" ;
Tue Oct 28 10:06:00 CET 2014
-$ \fBcat out.log\fP
+.RB $ " cat out.log" ;
Tue Oct 28 10:06:00 CET 2014
.EE
.in
.IR tloc .
.SH RETURN VALUE
On success, the value of time in seconds since the Epoch is returned.
-On error, \fI((time_t)\ \-1)\fP is returned, and
+On error,
+.I ((time_t)\ \-1)
+is returned, and
.I errno
is set to indicate the error.
.SH ERRORS
.P
.in +4n
.EX
-$ \fB./a.out 1 100\fP
+.RB $ " ./a.out 1 100" ;
Establishing handler for signal 34
Blocking signal 34
timer ID is 0x804c008
The return value may overflow the possible range of type
.IR clock_t .
On error,
-\fI(clock_t)\ \-1\fP is returned,
+.I (clock_t)\ \-1
+is returned,
and
.I errno
is set to indicate the error.
SVr4,
4.3BSD.
.P
-In POSIX.1-1996 the symbol \fBCLK_TCK\fP (defined in
+In POSIX.1-1996 the symbol
+.B CLK_TCK
+(defined in
.IR <time.h> )
is mentioned as obsolescent.
It is obsolete now.
On Linux 2.4 and earlier,
this point is the moment the system was booted.
Since Linux 2.6,
-this point is \fI(2\[ha]32/HZ) \- 300\fP
+this point is
+.I (2\[ha]32/HZ)\ \-\ 300
seconds before system boot time.
This variability across kernel versions (and across UNIX implementations),
combined with the fact that the returned value may overflow the range of
thread library use.
.SH RETURN VALUE
On success, zero is returned.
-On error, \-1 is returned, and \fIerrno\fP
+On error, \-1 is returned, and
+.I errno
is set to indicate the error.
.SH ERRORS
.TP
Don't dereference
.I target
if it is a symbolic link.
-This flag allows security problems to be avoided in set-user-ID-\fIroot\fP
+This flag allows security problems to be avoided in
+.RI set-user-ID- root
programs that allow unprivileged users to unmount filesystems.
.SH RETURN VALUE
On success, zero is returned.
.P
The original
.BR umount ()
-function was called as \fIumount(device)\fP and would return
+function was called as
+.I umount(device)
+and would return
.B ENOTBLK
when called with something other than a block device.
-In Linux 0.98p4, a call \fIumount(dir)\fP was added, in order to
+In Linux 0.98p4, a call
+.I umount(dir)
+was added, in order to
support anonymous devices.
-In Linux 2.3.99-pre7, the call \fIumount(device)\fP was removed,
-leaving only \fIumount(dir)\fP (since now devices can be mounted
+In Linux 2.3.99-pre7, the call
+.I umount(device)
+was removed,
+leaving only
+.I umount(dir)
+(since now devices can be mounted
in more than one place, so specifying the device does not suffice).
.SH NOTES
.SS umount() and shared mounts
.P
.in +4n
.EX
-$ \fBreadlink /proc/$$/ns/mnt\fP
+.RB $ " readlink /proc/$$/ns/mnt" ;
mnt:[4026531840]
-$ \fBsudo ./unshare \-m /bin/bash\fP
-# \fBreadlink /proc/$$/ns/mnt\fP
+.RB $ " sudo ./unshare \-m /bin/bash" ;
+.RB # " readlink /proc/$$/ns/mnt" ;
mnt:[4026532325]
.EE
.in
.P
.in +4n
.EX
-$ \fB./userfaultfd_demo 3\fP
+.RB $ " ./userfaultfd_demo 3" ;
Address returned by mmap() = 0x7fd30106c000
\&
fault_handler_thread():
For both calls, the new file timestamps are specified in the array
.IR times :
.I times[0]
-specifies the new "last access time" (\fIatime\fP);
+specifies the new "last access time"
+.RI ( atime );
.I times[1]
-specifies the new "last modification time" (\fImtime\fP).
+specifies the new "last modification time"
+.RI ( mtime ).
Each of the elements of
.I times
specifies a time as the number of seconds and nanoseconds
.\" Instead, the call fails with the error
.\" .BR EPERM .
.IP \[bu]
-POSIX.1 says that a process that has \fIwrite access to the file\fP
+POSIX.1 says that a process that has
+.I write access to the file
can make a call with
.I times
as NULL, or with
.BR wait ()
and
.BR waitpid ()
-store status information in the \fIint\fP to which it points.
+store status information in the
+.I int
+to which it points.
This integer can be inspected with the following macros (which
take the integer itself as an argument, not a pointer to it,
as is done in
.I id
arguments select the child(ren) to wait for, as follows:
.TP
-.IR idtype " == " \fBP_PID\fP
+.IR idtype " == " \f[B]P_PID\f[]
Wait for the child whose process ID matches
.IR id .
.TP
-.IR idtype " == " \fBP_PIDFD\fP " (since Linux 5.4)"
+.IR idtype " == " \f[B]P_PIDFD\f[] " (since Linux 5.4)"
.\" commit 3695eae5fee0605f316fbaad0b9e3de791d7dfaf
Wait for the child referred to by the PID file descriptor specified in
.IR id .
.BR pidfd_open (2)
for further information on PID file descriptors.)
.TP
-.IR idtype " == " \fBP_PGID\fP
+.IR idtype " == " \f[B]P_PGID\f[]
Wait for any child whose process group ID matches
.IR id .
Since Linux 5.4,
is zero, then wait for any child that is in the same process group
as the caller's process group at the time of the call.
.TP
-.IR idtype " == " \fBP_ALL\fP
+.IR idtype " == " \f[B]P_ALL\f[]
Wait for any child;
.I id
is ignored.
structure pointed to by
.IR infop :
.TP
-\fIsi_pid\fP
+.I si_pid
The process ID of the child.
.TP
-\fIsi_uid\fP
+.I si_uid
The real user ID of the child.
(This field is not set on most other implementations.)
.TP
-\fIsi_signo\fP
+.I si_signo
Always set to
.BR SIGCHLD .
.TP
-\fIsi_status\fP
+.I si_status
Either the exit status of the child, as given to
.BR _exit (2)
(or
.I si_code
field can be used to determine how to interpret this field.
.TP
-\fIsi_code\fP
+.I si_code
Set to one of:
.B CLD_EXITED
(child called
.B SIGCHLD
is set to
.BR SIG_IGN .
-See also the \fILinux Notes\fP section about threads.)
+See also the
+.I Linux\~Notes
+section about threads.)
.TP
.B EINTR
.B WNOHANG
see NOTES for the upper limit on Linux.
.SH RETURN VALUE
On success, the number of bytes written is returned.
-On error, \-1 is returned, and \fIerrno\fP is set
+On error, \-1 is returned, and
+.I errno
+is set
to indicate the error.
.P
Note that a successful
The subsequent call will either transfer further bytes or
may result in an error (e.g., if the disk is now full).
.P
-If \fIcount\fP is zero and
+If
+.I count
+is zero and
.I fd
refers to a regular file, then
.BR write ()
If no errors are detected, or error detection is not performed,
0 is returned without causing any other effect.
If
-\fIcount\fP is zero and
+.I count
+is zero and
.I fd
refers to a file other than a regular file,
the results are not specified.
.P
.in +4n
.EX
-$ \fB./ns_show /proc/self/ns/user p\fP
+.RB $ " ./ns_show /proc/self/ns/user p" ;
The parent namespace is outside your namespace scope
.EE
.in
.P
.in +4n
.EX
-$ \fBunshare \-Uu sleep 1000 &\fP
+.RB $ " unshare \-Uu sleep 1000 &"
[1] 23235
-$ \fB./ns_show /proc/23235/ns/uts u\fP
+.RB $ " ./ns_show /proc/23235/ns/uts u" ;
Device/Inode of owning user namespace is: [0,3] / 4026532448
-$ \fBreadlink /proc/23235/ns/user\fP
+.RB $ " readlink /proc/23235/ns/user" ;
user:[4026532448]
.EE
.in
.P
.in +4n
.EX
-$ \fBreadlink /proc/self/ns/user\fP
+.RB $ " readlink /proc/self/ns/user" ;
user:[4026531837]
-$ \fB./ns_show /proc/23235/ns/user p\fP
+.RB $ " ./ns_show /proc/23235/ns/user p" ;
Device/Inode of parent namespace is: [0,3] / 4026531837
.EE
.in
.P
.in +4n
.EX
-$ \fBPS1="sh2$ " unshare \-U bash\fP
-sh2$ \fB./ns_show /proc/self/ns/user p\fP
+.RB $ " PS1=\[dq]sh2$ \[dq] unshare \-U bash" ;
+.RB sh2$ " ./ns_show /proc/self/ns/user p" ;
The parent namespace is outside your namespace scope
-sh2$ \fB./ns_show /proc/self/ns/uts u\fP
+.RB sh2$ " ./ns_show /proc/self/ns/uts u" ;
The owning user namespace is outside your namespace scope
.EE
.in
.BR PR_SET_MM (2const)
by passing in a
.I struct prctl_mm_map
-(as defined in \fI<linux/prctl.h>\fP).
+(as defined in
+.IR <linux/prctl.h> ).
The
.I size
argument should provide the size of the struct.
.BI "int prctl(PR_SET_UNALIGN, unsigned long " flag );
.fi
.SH DESCRIPTION
-Set unaligned access control bits to \fIarg2\fP.
+Set unaligned access control bits to
+.IR arg2 .
.P
Pass
.B PR_UNALIGN_NOPRINT
Output to the terminal is restarted.
T}
TIOCPKT_DOSTOP T{
-The start and stop characters are \fB\[ha]S\fP/\fB\[ha]Q\fP.
+The start and stop characters are
+.BR \[ha]S / \[ha]Q .
T}
TIOCPKT_NOSTOP T{
-The start and stop characters are not \fB\[ha]S\fP/\fB\[ha]Q\fP.
+The start and stop characters are not
+.BR \[ha]S / \[ha]Q .
T}
.TE
.ad
and
.BR rlogind (8)
to implement a remote-echoed,
-locally \fB\[ha]S\fP/\fB\[ha]Q\fP flow-controlled remote login.
+locally
+.BR \[ha]S / \[ha]Q
+flow-controlled remote login.
.TP
.B TIOCGPKT
Return the current packet mode setting in the integer pointed to by
.P
.in +4n
.EX
-$ \fB./fat_dir /mnt/user\fP
+.RB $ " ./fat_dir /mnt/user" ;
\&. \-> \[aq]\[aq]
\&.. \-> \[aq]\[aq]
ALONGF\[ti]1.TXT \-> \[aq]a long filename.txt\[aq]
_Generic \- type-generic selection
.SH SYNOPSIS
.nf
-.BR _Generic( \fIexpression\fP ", type1: " e1 ", " "... /*" \
-", default: " "e */" );
+.BR _Generic( \f[I]expression\f[] ", type1: " \f[I]e1\f[] ", " "... /*" \
+", default: " "\f[I]e\f[] */" );
.fi
.SH DESCRIPTION
.BR _Generic ()
The
.BR abs ()
function computes the absolute value of the integer
-argument \fIj\fP.
+argument
+.IR j .
The
.BR labs (),
.BR llabs (),
and
.BR imaxabs ()
-functions compute the absolute value of the argument \fIj\fP of the
+functions compute the absolute value of the argument
+.I j
+of the
appropriate integer type for the function.
.SH RETURN VALUE
Returns the absolute value of the integer argument, of the appropriate
For
.BR llabs ()
to be declared, it may be necessary to define
-\fB_ISOC99_SOURCE\fP or \fB_ISOC9X_SOURCE\fP (depending on the
-version of glibc) before including any standard headers.
+.B _ISOC99_SOURCE
+or
+.B _ISOC9X_SOURCE
+(depending on the version of glibc)
+before including any standard headers.
.P
By default,
GCC handles
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is outside the range [\-1,\ 1]
+Domain error: \f[I]x\f[] is outside the range [\-1,\ 1]
.I errno
is set to
.BR EDOM .
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is less than 1
+Domain error: \f[I]x\f[] is less than 1
.I errno
is set to
.BR EDOM .
or
.BR fdatasync (2),
call.
-On error, \-1 is returned, and \fIerrno\fP is set to indicate the error.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
.P
If the asynchronous I/O operation has not yet completed,
the return value and effect of
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is outside the range [\-1,\ 1]
+Domain error: \f[I]x\f[] is outside the range [\-1,\ 1]
.I errno
is set to
.BR EDOM .
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP less than \-1 or greater than +1
+Domain error: \f[I]x\f[] less than \-1 or greater than +1
.I errno
is set to
.BR EDOM .
.RB ( FE_INVALID )
is raised.
.TP
-Pole error: \fIx\fP is +1 or \-1
+Pole error: \f[I]x\f[] is +1 or \-1
.I errno
is set to
.B ERANGE
The
.BR atof ()
function converts the initial portion of the string
-pointed to by \fInptr\fP to
+pointed to by
+.I nptr
+to
.IR double .
The behavior is the same as
.P
The
.BR atoi ()
function converts the initial portion of the string
-pointed to by \fInptr\fP to
+pointed to by
+.I nptr
+to
.IR int .
The behavior is the same as
.P
functions behave the same as
.BR atoi (),
except that they convert the initial portion of the
-string to their return type of \fIlong\fP or \fIlong long\fP.
+string to their return type of
+.I long
+or
+.IR long\~long .
.SH RETURN VALUE
The converted value or 0 on error.
.SH ATTRIBUTES
.P
.in +4n
.EX
-$ \fB./a.out 0x0123456789abcdef\fP
+.RB $ " ./a.out 0x0123456789abcdef" ;
0x123456789abcdef ==> 0xefcdab8967452301
.EE
.in
.SH DESCRIPTION
The
.BR btowc ()
-function converts \fIc\fP,
+function converts
+.IR c ,
interpreted as a multibyte sequence
of length 1, starting in the initial shift state, to a wide character and
returns it.
-If \fIc\fP is
+If
+.I c
+is
.B EOF
or not a valid multibyte sequence of length 1,
the
The
.BR btowc ()
function returns the wide character
-converted from the single byte \fIc\fP.
-If \fIc\fP is
+converted from the single byte
+.IR c .
+If
+.I c
+is
.B EOF
or not a valid multibyte sequence of length 1,
it returns
.SH DESCRIPTION
These functions calculate the complex arc cosine of
.IR z .
-If \fIy\ =\ cacos(z)\fP, then \fIz\ =\ ccos(y)\fP.
+If
+.IR "y\ =\ cacos(z)" ,
+then
+.IR "z\ =\ ccos(y)" .
The real part of
.I y
is chosen in the interval [0,pi].
.SH DESCRIPTION
These functions calculate the complex arc hyperbolic cosine of
.IR z .
-If \fIy\ =\ cacosh(z)\fP, then \fIz\ =\ ccosh(y)\fP.
+If
+.IR "y\ =\ cacosh(z)" ,
+then
+.IR "z\ =\ ccosh(y)" .
The imaginary part of
.I y
is chosen in the interval [\-pi,pi].
.SH DESCRIPTION
These functions calculate the complex arc sine of
.IR z .
-If \fIy\ =\ casin(z)\fP, then \fIz\ =\ csin(y)\fP.
+If
+.IR "y\ =\ casin(z)" ,
+then
+.IR "z\ =\ csin(y)" .
The real part of
.I y
is chosen in the interval [\-pi/2,pi/2].
.SH DESCRIPTION
These functions calculate the complex arc hyperbolic sine of
.IR z .
-If \fIy\~=\~casinh(z)\fP, then \fIz\~=\~csinh(y)\fP.
+If
+.IR "y\ =\ casinh(z)" ,
+then
+.IR "z\ =\ csinh(y)" .
The imaginary part of
.I y
is chosen in the interval [\-pi/2,pi/2].
.SH DESCRIPTION
These functions calculate the complex arc tangent of
.IR z .
-If \fIy\~=\~catan(z)\fP, then \fIz\~=\~ctan(y)\fP.
+If
+.IR "y\ =\ catan(z)" ,
+then
+.IR "z\ =\ ctan(y)" .
The real part of
.I y
is chosen in the interval [\-pi/2, pi/2].
.SH DESCRIPTION
These functions calculate the complex arc hyperbolic tangent of
.IR z .
-If \fIy\~=\~catanh(z)\fP, then \fIz\~=\~ctanh(y)\fP.
+If
+.IR "y\ =\ catanh(z)" ,
+then
+.IR "z\ =\ ctanh(y)" .
The imaginary part of
.I y
is chosen in the interval [\-pi/2,pi/2].
.BR clog ()
is the inverse function of the exponential
.BR cexp (3).
-Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP.
+Thus, if
+.IR "y\ =\ clog(z)" ,
+then
+.IR "z\ =\ cexp(y)" .
The imaginary part of
.I y
is chosen in the interval [\-pi,pi].
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity
+Domain error: \f[I]x\f[] is an infinity
.I errno
is set to
.B EDOM
.P
.I salt
is a two-character string chosen from the set
-[\fBa\-zA\-Z0\-9./\fP].
+.RB [ a\-zA\-Z0\-9./ ].
This string is used to
perturb the algorithm in one of 4096 different ways.
.P
.P
If
.I salt
-is a character string starting with the characters "$\fIid\fP$"
+is a character string starting with the characters
+.RI \[dq]$ id $\[dq]
followed by a string optionally terminated by "$",
then the result has the form:
.RS
.P
-$\fIid\fP$\fIsalt\fP$\fIhashed\fP
+.RI $ id $ salt $ hashed
.RE
.P
.I id
.TE
.RE
.P
-Thus, $5$\fIsalt\fP$\fIhashed\fP and $6$\fIsalt\fP$\fIhashed\fP
+Thus,
+.RI $5$ salt $ hashed
+and
+.RI $6$ salt $ hashed
contain the password hashed with, respectively, functions
based on SHA-256 and SHA-512.
.P
-"\fIsalt\fP" stands for the up to 16 characters
-following "$\fIid\fP$" in the salt.
-The "\fIhashed\fP"
+.RI \[dq] salt \[dq]
+stands for the up to 16 characters
+following
+.RI \[dq]$ id $\[dq]
+in the salt.
+The
+.RI \[dq] hashed \[dq]
part of the password string is the actual computed password.
The size of this string is fixed:
.RS
.TE
.RE
.P
-The characters in "\fIsalt\fP" and "\fIhashed\fP" are drawn from the set
-[\fBa\-zA\-Z0\-9./\fP].
+The characters in
+.RI \[dq] salt \[dq]
+and
+.RI \[dq] hashed \[dq]
+are drawn from the set
+.RB [ a\-zA\-Z0\-9./ ].
In the MD5 and SHA implementations the entire
.I key
is significant (instead of only the first
.\" glibc commit 9425cb9eea6a62fc21d99aafe8a60f752b934b05
the SHA-256 and SHA-512 implementations support a user-supplied number of
hashing rounds, defaulting to 5000.
-If the "$\fIid\fP$" characters in the salt are
-followed by "rounds=\fIxxx\fP$", where \fIxxx\fP is an integer, then the
+If the
+.RI \[dq]$ id $\[dq] characters in the salt are
+followed by
+.RI \[dq]rounds= xxx $\[dq],
+where
+.I xxx
+is an integer, then the
result has the form
.RS
.P
-$\fIid\fP$\fIrounds=yyy\fP$\fIsalt\fP$\fIhashed\fP
+.RI $ id $ rounds=yyy $ salt $ hashed
.RE
.P
-where \fIyyy\fP is the number of hashing rounds actually used.
+where
+.I yyy
+is the number of hashing rounds actually used.
The number of rounds actually used is 1000 if
.I xxx
is less than
These functions calculate the complex square root of
.IR z ,
with a branch cut along the negative real axis.
-(That means that \fIcsqrt(\-1+eps*I)\fP will be close to I while
-\fIcsqrt(\-1\-eps*I)\fP will be close to \-I, \fIif eps\fP is a small positive
-real number.)
+(That means that
+.I csqrt(\-1+eps*I)
+will be close to I while
+.I csqrt(\-1\-eps*I)
+will be close to \-I,
+.I if eps
+is a small positive real number.)
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
and
.BR localtime ()
functions all take
-an argument of data type \fItime_t\fP, which represents calendar time.
+an argument of data type
+.IR time_t ,
+which represents calendar time.
When interpreted as an absolute time value, it represents the number of
seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
.P
The call
.BI ctime( t )
is equivalent to
-.BI asctime(localtime( t )) \fR.
-It converts the calendar time \fIt\fP into a
+.IR asctime(localtime(t)) .
+It converts the calendar time
+.I t
+into a
null-terminated string of the form
.P
.in +4n
The return value points to a statically allocated string which
might be overwritten by subsequent calls to any of the date and time
functions.
-The function also sets the external variables \fItzname\fP,
-\fItimezone\fP, and \fIdaylight\fP as if it called
+The function also sets the external variables
+.IR tzname ,
+.IR timezone ,
+and
+.I daylight
+as if it called
.BR tzset (3).
The reentrant version
.BR ctime_r ()
does the same, but stores the
string in a user-supplied buffer
which should have room for at least 26 bytes.
-It need not
-set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP.
+It need not set
+.IR tzname ,
+.IR timezone ,
+and
+.IR daylight .
.P
The
.BR gmtime ()
-function converts the calendar time \fItimep\fP to
-broken-down time representation, expressed in Coordinated Universal Time
-(UTC).
+function converts the calendar time
+.I timep
+to broken-down time representation,
+expressed in Coordinated Universal Time (UTC).
It may return NULL when the year does not fit into an integer.
The return value points to a statically allocated struct which might be
overwritten by subsequent calls to any of the date and time functions.
.P
The
.BR localtime ()
-function converts the calendar time \fItimep\fP to
-broken-down time representation,
+function converts the calendar time
+.I timep
+to broken-down time representation,
expressed relative to the user's specified timezone.
-The function also sets the external variables \fItzname\fP,
-\fItimezone\fP, and \fIdaylight\fP as if it called
+The function also sets the external variables
+.IR tzname ,
+.IR timezone ,
+and
+.I daylight
+as if it called
.BR tzset (3).
The return value points to a statically allocated struct which might be
overwritten by subsequent calls to any of the date and time functions.
.BR localtime_r ()
function does the same, but stores the data in a
user-supplied struct.
-It need not set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP.
+It need not set
+.IR tzname ,
+.IR timezone ,
+and
+.IR daylight .
.P
The
.BR asctime ()
function converts the broken-down time value
-\fItm\fP into a null-terminated string with the same format as
+.I tm
+into a null-terminated string with the same format as
.BR ctime ().
The return value points to a statically allocated string which might be
overwritten by subsequent calls to any of the date and time functions.
is set (regardless of its initial value)
to a positive value or to 0, respectively,
to indicate whether DST is or is not in effect at the specified time.
-The function also sets the external variables \fItzname\fP,
-\fItimezone\fP, and \fIdaylight\fP as if it called
+The function also sets the external variables
+.IR tzname ,
+.IR timezone ,
+and
+.I daylight
+as if it called
.BR tzset (3).
.P
If the specified broken-down
The
.BR difftime ()
function returns the number of seconds elapsed
-between time \fItime1\fP and time \fItime0\fP, represented as a
+between time
+.I time1
+and time
+.IR time0 ,
+represented as a
.IR double .
Each time is a count of seconds.
.P
The
.BR div ()
function computes the value
-\fInumerator\fP/\fIdenominator\fP and
+.I numerator/denominator and
returns the quotient and remainder in a structure
-named \fIdiv_t\fP that contains
-two integer members (in unspecified order) named \fIquot\fP and \fIrem\fP.
+named
+.I div_t
+that contains
+two integer members (in unspecified order) named
+.I quot
+and
+.IR rem .
The quotient is rounded toward zero.
-The result satisfies \fIquot\fP*\fIdenominator\fP+\fIrem\fP = \fInumerator\fP.
+The result satisfies
+.IR "quot*denominator+rem\ =\ numerator" .
.P
The
.BR ldiv (),
functions do the same,
dividing numbers of the indicated type and
returning the result in a structure
-of the indicated name, in all cases with fields \fIquot\fP and \fIrem\fP
+of the indicated name, in all cases with fields
+.I quot
+and
+.I rem
of the same type as the function arguments.
.SH RETURN VALUE
-The \fIdiv_t\fP (etc.) structure.
+The
+.I div_t
+(etc.) structure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.EE
.in
.P
-the values \fIq.quot\fP and \fIq.rem\fP are \-1 and \-2, respectively.
+the values
+.I q.quot
+and
+.I q.rem
+are \-1 and \-2, respectively.
.SH SEE ALSO
.BR abs (3),
.BR remainder (3)
const ElfW(Phdr) *dlpi_phdr; /* Pointer to array of
ELF program headers
for this object */
- ElfW(Half) dlpi_phnum; /* # of items in \fIdlpi_phdr\fP */
+ ElfW(Half) dlpi_phnum; /* # of items in \f[I]dlpi_phdr\f[] */
\&
/* The following fields were added in glibc 2.4, after the first
- version of this structure was available. Check the \fIsize\fP
+ version of this structure was available. Check the \f[I]size\f[]
argument passed to the dl_iterate_phdr callback to determine
whether or not each later member is available. */
\&
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
Name: "" (9 segments)
0: [ 0x400040; memsz: 1f8] flags: 0x5; PT_PHDR
1: [ 0x400238; memsz: 1c] flags: 0x4; PT_INTERP
void *dli_fbase; /* Base address at which shared
object is loaded */
const char *dli_sname; /* Name of symbol whose definition
- overlaps \fIaddr\fP */
+ overlaps \f[I]addr\f[] */
void *dli_saddr; /* Exact address of symbol named
- in \fIdli_sname\fP */
+ in \f[I]dli_sname\f[] */
} Dl_info;
.EE
.in
.I info
shown in parentheses):
.TP
-.BR RTLD_DI_LMID " (\fILmid_t *\fP)"
+.BR RTLD_DI_LMID " (\f[I]Lmid_t *\f[])"
Obtain the ID of the link-map list (namespace) in which
.I handle
is loaded.
.TP
-.BR RTLD_DI_LINKMAP " (\fIstruct link_map **\fP)"
+.BR RTLD_DI_LINKMAP " (\f[I]struct link_map **\f[])"
Obtain a pointer to the
.I link_map
structure corresponding to
.EE
.in
.TP
-.BR RTLD_DI_ORIGIN " (\fIchar *\fP)"
+.BR RTLD_DI_ORIGIN " (\f[I]char *\f[])"
Copy the pathname of the origin of the shared object corresponding to
.I handle
to the location pointed to by
.IR info .
.TP
-.BR RTLD_DI_SERINFO " (\fIDl_serinfo *\fP)"
+.BR RTLD_DI_SERINFO " (\f[I]Dl_serinfo *\f[])"
Obtain the library search paths for the shared object referred to by
.IR handle .
The
.I dls_flags
field is currently unused, and always contains zero.
.TP
-.BR RTLD_DI_SERINFOSIZE " (\fIDl_serinfo *\fP)"
+.BR RTLD_DI_SERINFOSIZE " (\f[I]Dl_serinfo *\f[])"
Populate the
.I dls_size
and
.B RTLD_DI_SERINFO
request.
.TP
-.BR RTLD_DI_TLS_MODID " (\fIsize_t *\fP, since glibc 2.4)"
+.BR RTLD_DI_TLS_MODID " (\f[I]size_t *\f[], since glibc 2.4)"
Obtain the module ID of this shared object's TLS (thread-local storage)
segment, as used in TLS relocations.
If this object does not define a TLS segment, zero is placed in
.IR *info .
.TP
-.BR RTLD_DI_TLS_DATA " (\fIvoid **\fP, since glibc 2.4)"
+.BR RTLD_DI_TLS_DATA " (\f[I]void **\f[], since glibc 2.4)"
Obtain a pointer to the calling
thread's TLS block corresponding to this shared object's TLS segment.
If this object does not define a PT_TLS segment,
NULL is placed in
.IR *info .
.TP
-.BR RTLD_DI_PHDR " (\fIconst ElfW(Phdr *)\fP, since glibc 2.34.1)"
+.BR RTLD_DI_PHDR " (\f[I]const ElfW(Phdr *)\f[], since glibc 2.34.1)"
.\" glibc commit d056c212130280c0a54d9a4f72170ec621b70ce5 (2.36)
.\" glibc commit 28ea43f8d64f0dd1f2de75525157730e1532e600 (2.35.1)
.\" glibc commit 91c2e6c3db44297bf4cb3a2e3c40236c5b6a0b23 (2.34.1)
.P
.in +4n
.EX
-$ \fB./a.out /lib64/libm.so.6\fP
+.RB $ " ./a.out /lib64/libm.so.6" ;
dls_serpath[0].dls_name = /lib64
dls_serpath[1].dls_name = /usr/lib64
.EE
.P
.in +4n
.EX
-$ \fBcc dlopen_demo.c \-ldl\fP
-$ \fB./a.out\fP
+.RB $ " cc dlopen_demo.c \-ldl" ;
+.RB $ " ./a.out" ;
\-0.416147
.EE
.in
.P
.in +4n
.EX
-$ \fB./a.out abc\fP
+.RB $ " ./a.out abc" ;
ABC
.EE
.in
.SH DESCRIPTION
The
.BR ecvt ()
-function converts \fInumber\fP to a null-terminated
-string of \fIndigits\fP digits (where \fIndigits\fP is reduced to a
+function converts
+.I number
+to a null-terminated
+string of
+.I ndigits
+digits (where
+.I ndigits
+is reduced to a
system-specific limit determined by the precision of a
.IR double ),
and returns a pointer to the string.
The low order digit is rounded.
The string itself does not contain a decimal point; however,
the position of the decimal point relative to the start of the string
-is stored in \fI*decpt\fP.
-A negative value for \fI*decpt\fP means that
+is stored in
+.IR *decpt .
+A negative value for
+.I *decpt
+means that
the decimal point is to the left of the start of the string.
If the sign of
-\fInumber\fP is negative, \fI*sign\fP is set to a nonzero value,
+.I number
+is negative,
+.I *sign
+is set to a nonzero value,
otherwise it is set to 0.
If
.I number
-is zero, it is unspecified whether \fI*decpt\fP is 0 or 1.
+is zero, it is unspecified whether
+.I *decpt
+is 0 or 1.
.P
The
.BR fcvt ()
function is identical to
.BR ecvt (),
except that
-\fIndigits\fP specifies the number of digits after the decimal point.
+.I ndigits
+specifies the number of digits after the decimal point.
.SH RETURN VALUE
Both the
.BR ecvt ()
and
.BR fcvt ()
functions return a pointer to a
-static string containing the ASCII representation of \fInumber\fP.
+static string containing the ASCII representation of
+.IR number .
The static string is overwritten by each call to
.BR ecvt ()
or
in the name of each function indicates the size of
integer handled by the function, either 16, 32, or 64 bits.
.P
-The functions with names of the form "htobe\fInn\fP" convert
+The functions with names of the form
+.RI \[dq]htobe nn \[dq]
+convert
from host byte order to big-endian order.
.P
-The functions with names of the form "htole\fInn\fP" convert
+The functions with names of the form
+.RI \[dq]htole nn \[dq]
+convert
from host byte order to little-endian order.
.P
-The functions with names of the form "be\fInn\fPtoh" convert
+The functions with names of the form
+.RI \[dq]be nn toh\[dq]
+convert
from big-endian order to host byte order.
.P
-The functions with names of the form "le\fInn\fPtoh" convert
+The functions with names of the form
+.RI \[dq]le nn toh\[dq]
+convert
from little-endian order to host byte order.
.SH VERSIONS
Similar functions are present on the BSDs,
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
x.u32 = 0x44332211
htole32(x.u32) = 0x44332211
htobe32(x.u32) = 0x11223344
.P
The following errors can occur:
.TP
-Range error: result underflow (\fIx\fP is subnormal)
+Range error: result underflow (\f[I]x\f[] is subnormal)
.\" .I errno
.\" is set to
.\" .BR ERANGE .
.P
.in +4n
.EX
-$ \fBerrno \-l\fP
+.RB $ " errno \-l" ;
EPERM 1 Operation not permitted
ENOENT 2 No such file or directory
ESRCH 3 No such process
.P
.in +4n
.EX
-$ \fBerrno 2\fP
+.RB $ " errno 2" ;
ENOENT 2 No such file or directory
-$ \fBerrno ESRCH\fP
+.RB $ " errno ESRCH" ;
ESRCH 3 No such process
-$ \fBerrno \-s permission\fP
+.RB $ " errno \-s permission" ;
EACCES 13 Permission denied
.EE
.in
.\".P
.\" POSIX.1 (2001 edition) lists the following symbolic error names. Of
-.\" these, \fBEDOM\fP and \fBERANGE\fP are in the ISO C standard. ISO C
-.\" Amendment 1 defines the additional error number \fBEILSEQ\fP for
+.\" these, \f[B]EDOM\f[] and \f[B]ERANGE\f[] are in the ISO C standard. ISO C
+.\" Amendment 1 defines the additional error number \f[B]EILSEQ\f[] for
.\" coding errors in multibyte or wide characters.
.\"
.SS List of error names
.I stderr
the program name, a colon and a space, the message specified by the
.BR printf (3)-style
-format string \fIformat\fP, and, if \fIerrnum\fP is
-nonzero, a second colon and a space followed by the string given by
+format string
+.IR format ,
+and, if
+.I errnum
+is nonzero,
+a second colon and a space followed by the string given by
.IR strerror(errnum) .
Any arguments required for
.I format
The value of this variable can be modified to change the output of
.BR error ().
.P
-If \fIstatus\fP has a nonzero value, then
+If
+.I status
+has a nonzero value, then
.BR error ()
calls
.BR exit (3)
.IR filename ,
a colon, and the value of
.IR linenum .
-The preprocessor values \fB__LINE__\fP and
-\fB__FILE__\fP may be useful when calling
+The preprocessor values
+.B __LINE__
+and
+.B __FILE__
+may be useful when calling
.BR error_at_line (),
but other values can also be used.
For example, these arguments could refer to a location in an input file.
.P
-If the global variable \fIerror_one_per_line\fP is set nonzero,
+If the global variable
+.I error_one_per_line
+is set nonzero,
a sequence of
.BR error_at_line ()
calls with the
-same value of \fIfilename\fP and \fIlinenum\fP will result in only
+same value of
+.I filename
+and
+.I linenum
+will result in only
one message (the first) being output.
.P
-The global variable \fIerror_message_count\fP counts the number of
+The global variable
+.I error_message_count
+counts the number of
messages that have been output by
.BR error ()
and
.BR error_at_line ().
.P
-If the global variable \fIerror_print_progname\fP
+If the global variable
+.I error_print_progname
is assigned the address of a function
(i.e., is not NULL), then that function is called
instead of prefixing the message with the program name and colon.
.TE
.SH VERSIONS
The default search path (used when the environment
-does not contain the variable \fBPATH\fR)
+does not contain the variable
+.BR PATH )
shows some variation across systems.
It generally includes
.I /bin
.BR exit ()
function causes normal process termination and the least significant byte of
.I status
-(i.e., \fIstatus & 0xFF\fP) is returned to the parent (see
+(i.e.,
+.IR "status\ &\ 0xFF" )
+is returned to the parent (see
.BR wait (2)).
.P
All functions registered with
are removed.
.P
The C standard specifies two constants,
-\fBEXIT_SUCCESS\fP and \fBEXIT_FAILURE\fP,
+.B EXIT_SUCCESS
+and
+.BR EXIT_FAILURE ,
that may be passed to
.BR exit ()
to indicate successful or unsuccessful
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
.fi
.SH DESCRIPTION
-These functions return the positive difference, max(\fIx\fP-\fIy\fP,0),
+These functions return the positive difference,
+.IR max(x-y,0) ,
between their arguments.
.SH RETURN VALUE
On success, these functions return the positive difference.
The
.BR ffs ()
function returns the position of the first
-(least significant) bit set in the word \fIi\fP.
+(least significant) bit set in the word
+.IR i .
The least significant bit is position 1 and the
most significant position is, for example, 32 or 64.
The functions
.P
.BR getchar ()
is equivalent to
-.BI "getc(" stdin ) \fR.
+.IR getc(stdin) .
.P
.BR fgets ()
reads in at most one less than
(see
.BR group (5)).
.P
-The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
+The
+.I group
+structure is defined in
+.I <grp.h>
+as follows:
.P
.in +4n
.EX
The
.BR fgetpwent ()
function returns a pointer to a structure containing
-the broken out fields of a line in the file \fIstream\fP.
+the broken out fields of a line in the file
+.IR stream .
The first time it is called it returns the first entry;
thereafter, it returns successive entries.
The file referred to by
(see
.BR passwd (5)).
.P
-The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
+The
+.I passwd
+structure is defined in
+.I <pwd.h>
+as follows:
.P
.in +4n
.EX
of the
.BR fgetc (3)
function.
-It reads a wide character from \fIstream\fP and returns it.
-If the end of stream is reached, or if \fIferror(stream)\fP becomes true,
+It reads a wide character from
+.I stream
+and returns it.
+If the end of stream is reached, or if
+.I ferror(stream)
+becomes true,
it returns
.BR WEOF .
If a wide-character conversion error occurs, it sets
-\fIerrno\fP to \fBEILSEQ\fP and returns
+.I errno
+to
+.B EILSEQ
+and returns
.BR WEOF .
.P
The
of the
.BR fgets (3)
function.
-It reads a string of at most \fIn\-1\fP wide characters into the
-wide-character array pointed to by \fIws\fP,
+It reads a string of at most
+.I n\-1
+wide characters into the
+wide-character array pointed to by
+.IR ws ,
and adds a terminating null wide character (L\[aq]\[rs]0\[aq]).
It stops reading wide characters after it has encountered and
stored a newline wide character.
It also stops when end of stream is reached.
.P
-The programmer must ensure that there is room for at least \fIn\fP wide
-characters at \fIws\fP.
+The programmer must ensure that there is room for at least
+.I n
+wide characters at
+.IR ws .
.P
For a nonlocking counterpart, see
.BR unlocked_stdio (3).
.SH RETURN VALUE
The
.BR fgetws ()
-function, if successful, returns \fIws\fP.
+function, if successful, returns
+.IR ws .
If end of stream
was already reached or if an error occurred, it returns NULL.
.SH ATTRIBUTES
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP * \fIy\fP + \fIz\fP, \
-or \fIx\fP * \fIy\fP is invalid and \fIz\fP is not a NaN
+Domain error: \f[I]x * y + z\f[], \
+or \f[I]x * y\f[] is invalid and \f[I]z\f[] is not a NaN
.\" .I errno
.\" is set to
.\" .BR EDOM .
usually costs way more than the one branch.
.SH RETURN VALUE
On success, these
-functions return the value \fIx\fP\ \-\ \fIn\fP*\fIy\fP,
+functions return the value
+.IR "x\ \-\ n*y" ,
for some integer
.IR n ,
such that the returned value has the same sign as
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity
+Domain error: \f[I]x\f[] is an infinity
.I errno
is set to
.B EDOM
.RB ( FE_INVALID )
is raised.
.TP
-Domain error: \fIy\fP is zero
+Domain error: \f[I]y\f[] is zero
.I errno
is set to
.BR EDOM .
.B FNM_EXTMATCH
If this flag (a GNU extension) is set, extended patterns are
supported, as introduced by \&'ksh' and now supported by other shells.
-The extended format is as follows, with \fIpattern\-list\fR
+The extended format is as follows, with
+.I pattern\-list
being a \&'|' separated list of patterns.
.TP
-\&'?(\fIpattern\-list\fR)'
+.RI \&'?( pattern\-list )'
The pattern matches if zero or one occurrences of any of the
-patterns in the \fIpattern\-list\fR match the input \fIstring\fR.
+patterns in the
+.I pattern\-list
+match the input
+.IR string .
.TP
-\&'*(\fIpattern\-list\fR)'
+.RI \&'*( pattern\-list )'
The pattern matches if zero or more occurrences of any of the
-patterns in the \fIpattern\-list\fR match the input \fIstring\fR.
+patterns in the
+.I pattern\-list
+match the input
+.IR string .
.TP
-\&'+(\fIpattern\-list\fR)'
+.RI \&'+( pattern\-list )'
The pattern matches if one or more occurrences of any of the
-patterns in the \fIpattern\-list\fR match the input \fIstring\fR.
+patterns in the
+.I pattern\-list
+match the input
+.IR string .
.TP
-\&'@(\fIpattern\-list\fR)'
+.RI \&'@( pattern\-list )'
The pattern matches if exactly one occurrence of any of the
-patterns in the \fIpattern\-list\fR match the input \fIstring\fR.
+patterns in the
+.I pattern\-list
+match the input
+.IR string .
.TP
-\&'!(\fIpattern\-list\fR)'
-The pattern matches if the input \fIstring\fR cannot be matched with
-any of the patterns in the \fIpattern\-list\fR.
+.RI \&'!( pattern\-list )'
+The pattern matches if the input
+.I string
+cannot be matched with
+any of the patterns in the
+.IR pattern\-list .
.SH RETURN VALUE
Zero if
.I string
.BR fsetpos (3)
operation between write and read operations on such a stream.
This operation may be an apparent no-op
-(as in \fIfseek(..., 0L, SEEK_CUR)\fP
+(as in
+.I "fseek(...,\ 0L,\ SEEK_CUR)"
called for its synchronizing side effect).
.P
-Opening a file in append mode (\fBa\fP as the first character of
+Opening a file in append mode
+.RB ( a
+as the first character of
.IR mode )
causes all subsequent write operations to this stream to occur
at end-of-file, as if preceded by the call:
.TS
allbox;
lb lb
-c l.
+ci l.
fopen() mode open() flags
-\fIr\fP O_RDONLY
-\fIw\fP O_WRONLY | O_CREAT | O_TRUNC
-\fIa\fP O_WRONLY | O_CREAT | O_APPEND
-\fIr+\fP O_RDWR
-\fIw+\fP O_RDWR | O_CREAT | O_TRUNC
-\fIa+\fP O_RDWR | O_CREAT | O_APPEND
+r O_RDONLY
+w O_WRONLY | O_CREAT | O_TRUNC
+a O_WRONLY | O_CREAT | O_APPEND
+r+ O_RDWR
+w+ O_RDWR | O_CREAT | O_TRUNC
+a+ O_RDWR | O_CREAT | O_APPEND
.TE
.RE
.\"
equivalent of the
.BR fputc (3)
function.
-It writes the wide character \fIwc\fP to \fIstream\fP.
+It writes the wide character
+.I wc
+to
+.IR stream .
If
-\fIferror(stream)\fP becomes true, it returns
+.I ferror(stream)
+becomes true, it returns
.BR WEOF .
If a wide-character conversion error occurs,
-it sets \fIerrno\fP to \fBEILSEQ\fP and returns
+it sets
+.I errno
+to
+.B EILSEQ
+and returns
.BR WEOF .
-Otherwise, it returns \fIwc\fP.
+Otherwise, it returns
+.IR wc .
.P
The
.BR putwc ()
Apart from the usual ones, there is
.TP
.B EILSEQ
-Conversion of \fIwc\fP to the stream's encoding fails.
+Conversion of
+.I wc
+to the stream's encoding fails.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
reasonable to expect that
.BR fputwc ()
will actually write the multibyte
-sequence corresponding to the wide character \fIwc\fP.
+sequence corresponding to the wide character
+.IR wc .
.SH SEE ALSO
.BR fgetwc (3),
.BR fputws (3),
the
.BR fputs (3)
function.
-It writes the wide-character string starting at \fIws\fP,
+It writes the wide-character string starting at
+.IR ws ,
up to but not including the terminating null wide character (L\[aq]\[rs]0\[aq]),
-to \fIstream\fP.
+to
+.IR stream .
.P
For a nonlocking counterpart, see
.BR unlocked_stdio (3).
reasonable to expect that
.BR fputws ()
will actually write the multibyte
-string corresponding to the wide-character string \fIws\fP.
+string corresponding to the wide-character string
+.IR ws .
.SH SEE ALSO
.BR fputwc (3),
.BR unlocked_stdio (3)
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
ELF magic: 0x7f454c46
Class: 0x02
.EE
.EE
.in
.P
-Here \fItime\fP is the number of seconds since the Epoch,
-and \fImillitm\fP is the number of milliseconds since \fItime\fP
+Here
+.I time
+is the number of seconds since the Epoch,
+and
+.I millitm
+is the number of milliseconds since
+.I time
seconds since the Epoch.
-The \fItimezone\fP field is the local timezone measured in minutes
+The
+.I timezone
+field is the local timezone measured in minutes
of time west of Greenwich (with a negative value indicating minutes
east of Greenwich).
-The \fIdstflag\fP field
+The
+.I dstflag
+field
is a flag that, if nonzero, indicates that Daylight Saving time
applies locally during the appropriate part of the year.
.P
-POSIX.1-2001 says that the contents of the \fItimezone\fP and \fIdstflag\fP
+POSIX.1-2001 says that the contents of the
+.I timezone
+and
+.I dstflag
fields are unspecified; avoid relying on them.
.SH RETURN VALUE
This function always returns 0.
.SH DESCRIPTION
.BR nftw ()
walks through the directory tree that is
-located under the directory \fIdirpath\fP,
-and calls \fIfn\fP() once for each entry in the tree.
+located under the directory
+.IR dirpath ,
+and calls
+.IR fn ()
+once for each entry in the tree.
By default, directories are handled before the files and
subdirectories they contain (preorder traversal).
.P
To avoid using up all of the calling process's file descriptors,
-\fInopenfd\fP specifies the maximum number of directories that
+.I nopenfd
+specifies the maximum number of directories that
.BR nftw ()
will hold open simultaneously.
When
For each entry found in the tree,
.BR nftw ()
calls
-\fIfn\fP() with four arguments:
+.IR fn ()
+with four arguments:
.IR fpath ,
.IR sb ,
.IR typeflag ,
.TP
.B FTW_DP
.I fpath
-is a directory, and \fBFTW_DEPTH\fP was specified in \fIflags\fP.
+is a directory, and
+.B FTW_DEPTH
+was specified in
+.IR flags .
(If
.B FTW_DEPTH
was not specified in
set to
.BR FTW_D .)
All of the files
-and subdirectories within \fIfpath\fP have been processed.
+and subdirectories within
+.I fpath
+have been processed.
.TP
.B FTW_NS
The
.TP
.B FTW_SL
.I fpath
-is a symbolic link, and \fBFTW_PHYS\fP was set in \fIflags\fP.
+is a symbolic link, and
+.B FTW_PHYS
+was set in
+.IR flags .
.\" To obtain the definition of this constant from
.\" .IR <ftw.h> ,
.\" either
.B FTW_SLN
.I fpath
is a symbolic link pointing to a nonexistent file.
-(This occurs only if \fBFTW_PHYS\fP is not set.)
+(This occurs only if
+.B FTW_PHYS
+is not set.)
In this case the
.I sb
argument passed to
that
.BR nftw ()
supplies when calling
-\fIfn\fP()
-is a pointer to a structure of type \fIFTW\fP:
+.IR fn ()
+is a pointer to a structure of type
+.IR FTW :
.P
.in +4n
.EX
.RI ( dirpath ,
which has depth 0).
.P
-To stop the tree walk, \fIfn\fP() returns a nonzero value; this
+To stop the tree walk,
+.IR fn ()
+returns a nonzero value; this
value will become the return value of
.BR nftw ().
-As long as \fIfn\fP() returns 0,
+As long as
+.IR fn ()
+returns 0,
.BR nftw ()
will continue either until it has traversed the entire tree,
in which case it will return zero,
Because
.BR nftw ()
uses dynamic data structures, the only safe way to
-exit out of a tree walk is to return a nonzero value from \fIfn\fP().
+exit out of a tree walk is to return a nonzero value from
+.IR fn ().
To allow a signal to terminate the walk without causing a memory leak,
-have the handler set a global flag that is checked by \fIfn\fP().
-\fIDon't\fP use
+have the handler set a global flag that is checked by
+.IR fn ().
+.I Don't
+use
.BR longjmp (3)
unless the program is going to terminate.
.P
-The \fIflags\fP argument of
+The
+.I flags
+argument of
.BR nftw ()
is formed by ORing zero or more of the
following flags:
to continue normally.
.TP
.B FTW_SKIP_SIBLINGS
-If \fIfn\fP() returns this value, then
+If
+.IR fn ()
+returns this value, then
siblings of the current entry will be skipped,
and processing continues in the parent.
-.\" If \fBFTW_DEPTH\fP
+.\" If \f[B]FTW_DEPTH\f[]
.\" is set, the entry's parent directory is processed next (with
-.\" \fIflag\fP set to \fBFTW_DP\fP).
+.\" \f[I]flag\f[] set to \f[B]FTW_DP\f[]).
.TP
.B FTW_SKIP_SUBTREE
-If \fIfn\fP() is called with an entry that is a directory
-(\fItypeflag\fP is \fBFTW_D\fP), this return
+If
+.IR fn ()
+is called with an entry that is a directory
+.RI ( typeflag
+is
+.BR FTW_D ),
+this return
value will prevent objects within that directory from being passed as
-arguments to \fIfn\fP().
+arguments to
+.IR fn ().
.BR nftw ()
continues processing with the next sibling of the directory.
.TP
Causes
.BR nftw ()
to return immediately with the return value
-\fBFTW_STOP\fP.
+.BR FTW_STOP .
.P
Other return values could be associated with new actions in the future;
-\fIfn\fP() should not return values other than those listed above.
+.IR fn ()
+should not return values other than those listed above.
.P
The feature test macro
.B _GNU_SOURCE
.I any
header files)
in order to
-obtain the definition of \fBFTW_ACTIONRETVAL\fP from \fI<ftw.h>\fP.
+obtain the definition of
+.B FTW_ACTIONRETVAL
+from
+.IR <ftw.h> .
.RE
.TP
.B FTW_CHDIR
.BR chdir (2)
to each directory before handling its contents.
This is useful if the program needs to perform some action
-in the directory in which \fIfpath\fP resides.
+in the directory in which
+.I fpath
+resides.
(Specifying this flag has no effect on the pathname that is passed in the
.I fpath
argument of
.IR fn .)
.TP
.B FTW_DEPTH
-If set, do a post-order traversal, that is, call \fIfn\fP() for
-the directory itself \fIafter\fP handling the contents of the directory
+If set, do a post-order traversal, that is, call
+.IR fn ()
+for the directory itself
+.I after
+handling the contents of the directory
and its subdirectories.
-(By default, each directory is handled \fIbefore\fP its contents.)
+(By default, each directory is handled
+.I before
+its contents.)
.TP
.B FTW_MOUNT
If set, stay within the same filesystem
(This is what you want.)
If not set, symbolic links are followed, but no file is reported twice.
.IP
-If \fBFTW_PHYS\fP is not set, but \fBFTW_DEPTH\fP is set,
+If
+.B FTW_PHYS
+is not set, but
+.B FTW_DEPTH
+is set,
then the function
.IR fn ()
is never called for a directory that would be a descendant of itself.
.SH RETURN VALUE
These functions return 0 on success, and \-1 if an error occurs.
.P
-If \fIfn\fP() returns nonzero,
-then the tree walk is terminated and the value returned by \fIfn\fP()
+If
+.IR fn ()
+returns nonzero,
+then the tree walk is terminated and the value returned by
+.IR fn ()
is returned as the result of
.BR ftw ()
or
.P
If
.BR nftw ()
-is called with the \fBFTW_ACTIONRETVAL\fP flag,
-then the only nonzero value that should be used by \fIfn\fP()
-to terminate the tree walk is \fBFTW_STOP\fP,
+is called with the
+.B FTW_ACTIONRETVAL
+flag,
+then the only nonzero value that should be used by
+.IR fn ()
+to terminate the tree walk is
+.BR FTW_STOP ,
and that value is returned as the result of
.BR nftw ().
.SH ATTRIBUTES
.SH VERSIONS
In some implementations (e.g., glibc),
.BR ftw ()
-will never use \fBFTW_SL\fP; on other systems \fBFTW_SL\fP occurs only
+will never use
+.BR FTW_SL ;
+on other systems
+.B FTW_SL
+occurs only
for symbolic links that do not point to an existing file;
and again on other systems
.BR ftw ()
-will use \fBFTW_SL\fP for each symbolic link.
+will use
+.B FTW_SL
+for each symbolic link.
If
.I fpath
is a symbolic link and
.BR stat (2)
failed, POSIX.1-2008 states
-that it is undefined whether \fBFTW_NS\fP or \fBFTW_SL\fP
+that it is undefined whether
+.B FTW_NS
+or
+.B FTW_SL
is passed in
.IR typeflag .
For predictable results, use
if no argument is supplied.
It displays various information about each file.
The second command-line argument can be used to specify characters that
-control the value assigned to the \fIflags\fP
+control the value assigned to the
+.I flags
argument when calling
.BR nftw ().
.SS Program source
|| _POSIX_C_SOURCE >= 200112L
.fi
.SH DESCRIPTION
-When \fImode\fP is zero, the
+When
+.I mode
+is zero, the
.BR fwide ()
function determines the current
-orientation of \fIstream\fP.
-It returns a positive value if \fIstream\fP is
-wide-character oriented, that is, if wide-character I/O is permitted but char
-I/O is disallowed.
-It returns a negative value if \fIstream\fP is byte oriented\[em]that is,
+orientation of
+.IR stream .
+It returns a positive value if
+.I stream
+is wide-character oriented,
+that is,
+if wide-character I/O is permitted but char I/O is disallowed.
+It returns a negative value if
+.I stream
+is byte oriented\[em]that is,
if char I/O is permitted but wide-character I/O is disallowed.
It
-returns zero if \fIstream\fP has no orientation yet; in this case the next
+returns zero if
+.I stream
+has no orientation yet;
+in this case the next
I/O operation might change the orientation (to byte oriented if it is a char
I/O operation, or to wide-character oriented if it is a wide-character I/O
operation).
Once a stream has an orientation, it cannot be changed and persists until
the stream is closed.
.P
-When \fImode\fP is nonzero, the
+When
+.I mode
+is nonzero, the
.BR fwide ()
function first attempts to set
-\fIstream\fP's orientation (to wide-character oriented
-if \fImode\fP is greater than 0, or
-to byte oriented if \fImode\fP is less than 0).
+.IR stream 's
+orientation (to wide-character oriented
+if
+.I mode
+is greater than 0,
+or to byte oriented if
+.I mode
+is less than 0).
It then returns a value denoting the
current orientation, as above.
.SH RETURN VALUE
.SH DESCRIPTION
The
.BR gcvt ()
-function converts \fInumber\fP to a minimal length null-terminated
-ASCII string and stores the result in \fIbuf\fP.
-It produces \fIndigit\fP significant digits in either
+function converts
+.I number
+to a minimal length null-terminated ASCII string
+and stores the result in
+.IR buf .
+It produces
+.I ndigit
+significant digits in either
.BR printf (3)
F format or E format.
.SH RETURN VALUE
The
.BR gcvt ()
function returns
-\fIbuf\fP.
+.IR buf .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.P
.in +4n
.EX
-$ \fB./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org\fP
+.RB $ " ./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org" ;
mirrors.kernel.org: 139.178.88.99
enoent.linuxfoundation.org: Name or service not known
gnu.org: 209.51.188.116
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org
> c 2
[2] gnu.org: Request not canceled
.BR secure_getenv ()
glibc 2.17.
.SH NOTES
-The strings in the environment list are of the form \fIname=value\fP.
+The strings in the environment list are of the form
+.IR name=value .
.P
As typically implemented,
.BR getenv ()
function is used to close the group database
after all processing has been performed.
.P
-The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
+The
+.I group
+structure is defined in
+.I <grp.h>
+as follows:
.P
.in +4n
.EX
The latter reads the next group entry from
.IR stream .
.P
-The \fIgroup\fP structure is defined in
+The
+.I group
+structure is defined in
.I <grp.h>
as follows:
.P
caller-provided buffers.
First of all there is the buffer
.I gbuf
-that can hold a \fIstruct group\fP.
+that can hold a
+.IR "struct\ group" .
And next the buffer
.I buf
of size
.I size
that can hold additional strings.
-The result of these functions, the \fIstruct group\fP read from the stream,
+The result of these functions, the
+.I struct\ group
+read from the stream,
is stored in the provided buffer
.IR *gbuf ,
-and a pointer to this \fIstruct group\fP is returned in
+and a pointer to this
+.I struct\ group
+is returned in
.IR *gbufp .
.SH RETURN VALUE
On success, these functions return 0 and
.I *gbufp
-is a pointer to the \fIstruct group\fP.
+is a pointer to the
+.IR "struct\ group" .
On error, these functions return an error value and
.I *gbufp
is NULL.
that matches the group ID
.IR gid .
.P
-The \fIgroup\fP structure is defined in \fI<grp.h>\fP as follows:
+The
+.I group
+structure is defined in
+.I <grp.h>
+as follows:
.P
.in +4n
.EX
.P
The
.BR sethostent ()
-function specifies, if \fIstayopen\fP is true (1),
+function specifies, if
+.I stayopen
+is true (1),
that a connected TCP socket should be used for the name server queries and
that the connection should remain open during successive queries.
Otherwise, name server queries will use UDP datagrams.
(see
.BR hostname (7)
for the file format).
-The current domain and its parents are searched unless \fIname\fP
+The current domain and its parents are searched unless
+.I name
ends in a dot.
.P
The
.BR gethostbyaddr ()
-function returns a structure of type \fIhostent\fP
-for the given host address \fIaddr\fP of size \fIlen\fP and address type
-\fItype\fP.
+function returns a structure of type
+.I hostent
+for the given host address
+.I addr
+of size
+.I len
+and address type
+.IR type .
Valid address types are
.B AF_INET
and
(defined in
.IR <sys/socket.h> ).
The host address argument is a pointer to a struct of a type depending
-on the address type, for example a \fIstruct in_addr *\fP (probably
+on the address type, for example a
+.I struct\ in_addr\ *
+(probably
obtained via a call to
.BR inet_addr (3))
for address type
The (obsolete)
.BR herror ()
function prints the error message associated
-with the current value of \fIh_errno\fP on \fIstderr\fP.
+with the current value of
+.I h_errno
+on
+.IR stderr .
.P
The (obsolete)
.BR hstrerror ()
function takes an error number
-(typically \fIh_errno\fP) and returns the corresponding message string.
+(typically
+.IR h_errno )
+and returns the corresponding message string.
.P
The domain name queries carried out by
.BR gethostbyname ()
.I /etc/host.conf
.RB ( host.conf (5)).
.P
-The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows:
+The
+.I hostent
+structure is defined in
+.I <netdb.h>
+as follows:
.P
.in +4n
.EX
.EE
.in
.P
-The members of the \fIhostent\fP structure are:
+The members of the
+.I hostent
+structure are:
.TP
.I h_name
The official name of the host.
order), terminated by a null pointer.
.TP
.I h_addr
-The first address in \fIh_addr_list\fP for backward compatibility.
+The first address in
+.I h_addr_list
+for backward compatibility.
.SH RETURN VALUE
The
.BR gethostbyname ()
variable holds an error number.
When non-NULL, the return value may point at static data, see the notes below.
.SH ERRORS
-The variable \fIh_errno\fP can have the following values:
+The variable
+.I h_errno
+can have the following values:
.TP
.B HOST_NOT_FOUND
The specified host is unknown.
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
lo AF_PACKET (17)
tx_packets = 524; rx_packets = 524
tx_bytes = 38788; rx_bytes = 38788
.fi
.SH DESCRIPTION
.BR getline ()
-reads an entire line from \fIstream\fP,
+reads an entire line from
+.IR stream ,
storing the address of the buffer containing the text into
.IR *lineptr .
The buffer is null-terminated and includes the newline character, if
.BR cuserid ()
returns a pointer to a string containing a username
associated with the effective user ID of the process.
-If \fIstring\fP
+If
+.I string
is not a null pointer, it should be an array that can hold at least
-\fBL_cuserid\fP characters; the string is returned in this array.
+.B L_cuserid
+characters; the string is returned in this array.
Otherwise, a pointer to a string in a static area is returned.
This
string is statically allocated and might be overwritten on subsequent
calls to this function or to
.BR getlogin ().
.P
-The macro \fBL_cuserid\fP is an integer constant that indicates how
+The macro
+.B L_cuserid
+is an integer constant that indicates how
long an array you might need to store a username.
-\fBL_cuserid\fP is declared in \fI<stdio.h>\fP.
+.B L_cuserid
+is declared in
+.IR <stdio.h> .
.P
These functions let your program identify positively the user who is
running
(These can differ when set-user-ID programs are involved.)
.P
For most purposes, it is more useful to use the environment variable
-\fBLOGNAME\fP to find out who the user is.
+.B LOGNAME
+to find out who the user is.
This is more flexible
-precisely because the user can set \fBLOGNAME\fP arbitrarily.
+precisely because the user can set
+.B LOGNAME
+arbitrarily.
.SH RETURN VALUE
.BR getlogin ()
returns a pointer to the username when successful,
(See BUGS.)
.SH FILES
.TP
-\fI/etc/passwd\fP
+.I /etc/passwd
password database file
.TP
-\fI/var/run/utmp\fP
-(traditionally \fI/etc/utmp\fP;
-some libc versions used \fI/var/adm/utmp\fP)
+.I /var/run/utmp
+(traditionally
+.IR /etc/utmp ;
+some libc versions used
+.IR /var/adm/utmp )
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
are the argument count and array as passed to the
.IR main ()
function on program invocation.
-An element of \fIargv\fP that starts with \[aq]\-\[aq]
+An element of
+.I argv
+that starts with \[aq]\-\[aq]
(and is not exactly "\-" or "\-\-")
is an option element.
The characters of this element
If
.BR getopt ()
finds another option character, it returns that
-character, updating the external variable \fIoptind\fP and a static
-variable \fInextchar\fP so that the next call to
+character, updating the external variable
+.I optind
+and a static variable
+.I nextchar
+so that the next call to
.BR getopt ()
can
resume the scan with the following option character or
-\fIargv\fP-element.
+.IR argv -element.
.P
If there are no more option characters,
.BR getopt ()
returns \-1.
-Then \fIoptind\fP is the index in \fIargv\fP of the first
-\fIargv\fP-element that is not an option.
+Then
+.I optind
+is the index in
+.I argv
+of the first
+.IR argv -element
+that is not an option.
.P
.I optstring
is a string containing the legitimate option characters.
character is followed by a colon, the option requires an argument, so
.BR getopt ()
places a pointer to the following text in the same
-\fIargv\fP-element, or the text of the following \fIargv\fP-element, in
+.IR argv -element,
+or the text of the following
+.IR argv -element,
+in
.IR optarg .
Two colons mean an option takes
-an optional arg; if there is text in the current \fIargv\fP-element
+an optional arg; if there is text in the current
+.IR argv -element
(i.e., in the same word as the option name itself, for example, "\-oarg"),
-then it is returned in \fIoptarg\fP, otherwise \fIoptarg\fP is set to zero.
+then it is returned in
+.IR optarg ,
+otherwise
+.I optarg
+is set to zero.
This is a GNU extension.
If
.I optstring
.P
By default,
.BR getopt ()
-permutes the contents of \fIargv\fP as it
-scans, so that eventually all the nonoptions are at the end.
+permutes the contents of
+.I argv
+as it scans,
+so that eventually all the nonoptions are at the end.
Two other scanning modes are also implemented.
If the first character of
-\fIoptstring\fP is \[aq]+\[aq] or the environment variable
+.I optstring
+is \[aq]+\[aq] or the environment variable
.B POSIXLY_CORRECT
is set, then option processing stops as soon as a nonoption argument is
encountered.
behaviour is required in this case
.I optstring
will contain two \[aq]+\[aq] symbols.
-If the first character of \fIoptstring\fP is \[aq]\-\[aq], then
-each nonoption \fIargv\fP-element is handled as if it were the argument of
+If the first character of
+.I optstring
+is \[aq]\-\[aq],
+then each nonoption
+.IR argv -element
+is handled as if it were the argument of
an option with character code 1.
(This is used by programs that were
-written to expect options and other \fIargv\fP-elements in any order
+written to expect options and other
+.IR argv -elements
+in any order
and that care about the ordering of the two.)
The special argument "\-\-" forces an end of option-scanning regardless
of the scanning mode.
.IP \[bu]
If the first character
(following any optional \[aq]+\[aq] or \[aq]\-\[aq] described above)
-of \fIoptstring\fP
+of
+.I optstring
is a colon (\[aq]:\[aq]), then
.BR getopt ()
likewise does not print an error message.
.TP
.I has_arg
is:
-\fBno_argument\fP (or 0) if the option does not take an argument;
-\fBrequired_argument\fP (or 1) if the option requires an argument; or
-\fBoptional_argument\fP (or 2) if the option takes an optional argument.
+.B no_argument
+(or 0) if the option does not take an argument;
+.B required_argument
+(or 1) if the option requires an argument; or
+.B optional_argument
+(or 2) if the option takes an optional argument.
.TP
.I flag
specifies how results are returned for a long option.
-If \fIflag\fP
+If
+.I flag
is NULL, then
.BR getopt_long ()
-returns \fIval\fP.
-(For example, the calling program may set \fIval\fP to the equivalent short
+returns
+.IR val .
+(For example, the calling program may set
+.I val
+to the equivalent short
option character.)
Otherwise,
.BR getopt_long ()
returns 0, and
-\fIflag\fP points to a variable which is set to \fIval\fP if the
-option is found, but left unchanged if the option is not found.
+.I flag
+points to a variable which is set to
+.I val
+if the option is found,
+but left unchanged if the option is not found.
.TP
-\fIval\fP
+.I val
is the value to return, or to load into the variable pointed
-to by \fIflag\fP.
+to by
+.IR flag .
.P
The last element of the array has to be filled with zeros.
.P
-If \fIlongindex\fP is not NULL, it
+If
+.I longindex
+is not NULL, it
points to a variable which is set to the index of the long option relative to
.IR longopts .
.P
also return the option
character when a short option is recognized.
For a long option, they
-return \fIval\fP if \fIflag\fP is NULL, and 0 otherwise.
+return
+.I val
+if
+.I flag
+is NULL, and 0 otherwise.
Error and \-1 returns are the same as for
.BR getopt (),
plus \[aq]?\[aq] for an
The
.BR getpw ()
function reconstructs the password line entry for
-the given user ID \fIuid\fP in the buffer \fIbuf\fP.
+the given user ID
+.I uid
+in the buffer
+.IR buf .
The returned buffer contains a line of format
.P
.in +4n
.EE
.in
.P
-The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
+The
+.I passwd
+structure is defined in
+.I <pwd.h>
+as follows:
.P
.in +4n
.EX
function is used to close the password database
after all processing has been performed.
.P
-The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
+The
+.I passwd
+structure is defined in
+.I <pwd.h>
+as follows:
.P
.in +4n
.EX
The latter reads the next passwd entry from
.IR stream .
.P
-The \fIpasswd\fP structure is defined in
+The
+.I passwd
+structure is defined in
.I <pwd.h>
as follows:
.P
caller-provided buffers.
First of all there is the buffer
.I pwbuf
-that can hold a \fIstruct passwd\fP.
+that can hold a
+.IR "struct\ passwd" .
And next the buffer
.I buf
of size
.I size
that can hold additional strings.
-The result of these functions, the \fIstruct passwd\fP read from the stream,
+The result of these functions, the
+.I struct\ passwd
+read from the stream,
is stored in the provided buffer
.IR *pwbuf ,
-and a pointer to this \fIstruct passwd\fP is returned in
+and a pointer to this
+.I struct\ passwd
+is returned in
.IR *pwbufp .
.SH RETURN VALUE
On success, these functions return 0 and
.I *pwbufp
-is a pointer to the \fIstruct passwd\fP.
+is a pointer to the
+.IR "struct\ passwd" .
On error, these functions return an error value and
.I *pwbufp
is NULL.
that matches the user ID
.IR uid .
.P
-The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
+The
+.I passwd
+structure is defined in
+.I <pwd.h>
+as follows:
.P
.in +4n
.EX
often with different prototypes.
.\" SUN doesn't have sgetspent_r()
.SS Structure
-The shadow password structure is defined in \fI<shadow.h>\fP as follows:
+The shadow password structure is defined in
+.I <shadow.h>
+as follows:
.P
.in +4n
.EX
.SH RETURN VALUE
The functions that return a pointer return NULL if no more entries
are available or if an error occurs during processing.
-The functions which have \fIint\fP as the return value return 0 for
+The functions which have
+.I int
+as the return value return 0 for
success and \-1 for failure, with
.I errno
set to indicate the error.
(Such a suboption list is typically produced when
.BR getopt (3)
is used to parse a command line;
-see for example the \fI\-o\fP option of
+see for example the
+.I \-o
+option of
.BR mount (8).)
Each suboption may include an associated value,
which is separated from the suboption name by an equal sign.
If
.BR utmpname ()
is not used to set the filename
-before the other functions are used, they assume \fB_PATH_UTMP\fP, as
-defined in \fI<paths.h>\fP.
+before the other functions are used, they assume
+.BR _PATH_UTMP ,
+as defined in
+.IR <paths.h> .
.P
.BR setutent ()
rewinds the file pointer to the beginning of the utmp file.
.P
.BR getutid ()
searches forward from the current file position in the utmp
-file based upon \fIut\fP.
-If \fIut\->ut_type\fP is one of \fBRUN_LVL\fP,
-\fBBOOT_TIME\fP, \fBNEW_TIME\fP, or \fBOLD_TIME\fP,
+file based upon
+.IR ut .
+If
+.I ut\->ut_type
+is one of
+.BR RUN_LVL ,
+.BR BOOT_TIME ,
+.BR NEW_TIME ,
+or
+.BR OLD_TIME ,
.BR getutid ()
will
-find the first entry whose \fIut_type\fP field matches \fIut\->ut_type\fP.
-If \fIut\->ut_type\fP is one of \fBINIT_PROCESS\fP, \fBLOGIN_PROCESS\fP,
-\fBUSER_PROCESS\fP, or \fBDEAD_PROCESS\fP,
+find the first entry whose
+.I ut_type
+field matches
+.IR ut\->ut_type .
+If
+.I ut\->ut_type
+is one of
+.BR INIT_PROCESS ,
+.BR LOGIN_PROCESS ,
+.BR USER_PROCESS ,
+or
+.BR DEAD_PROCESS ,
.BR getutid ()
will find the
first entry whose
.I ut_id
-field matches \fIut\->ut_id\fP.
+field matches
+.IR ut\->ut_id .
.P
.BR getutline ()
searches forward from the current file position in the utmp file.
It scans entries whose
.I ut_type
-is \fBUSER_PROCESS\fP
-or \fBLOGIN_PROCESS\fP and returns the first one whose
+is
+.B USER_PROCESS
+or
+.B LOGIN_PROCESS
+and returns the first one whose
.I ut_line
field
-matches \fIut\->ut_line\fP.
+matches
+.IR ut\->ut_line .
.P
.BR pututline ()
writes the
.I utmp
-structure \fIut\fP into the utmp file.
+structure
+.I ut
+into the utmp file.
It uses
.BR getutid ()
to search for the proper place in the file to insert
the new entry.
-If it cannot find an appropriate slot for \fIut\fP,
+If it cannot find an appropriate slot for
+.IR ut ,
.BR pututline ()
will append the new entry to the end of the file.
.SH RETURN VALUE
.BR getutid (),
and
.BR getutline ()
-return a pointer to a \fIstruct utmp\fP on success,
+return a pointer to a
+.I struct\ utmp
+on success,
and NULL on failure (which includes the "record not found" case).
-This \fIstruct utmp\fP is allocated in static storage, and may be
-overwritten by subsequent calls.
+This
+.I struct\ utmp
+is allocated in static storage,
+and may be overwritten by subsequent calls.
.P
On success
.BR pututline ()
although this function is not specified by POSIX.1.
.P
On some other systems,
-the \fIutmpx\fP structure is a superset of the \fIutmp\fP structure,
+the
+.I utmpx
+structure is a superset of the
+.I utmp
+structure,
with additional fields, and larger versions of the existing fields,
and parallel files are maintained, often
.I /var/*/utmpx
and
.IR /var/*/wtmpx .
.P
-Linux glibc on the other hand does not use a parallel \fIutmpx\fP file
-since its \fIutmp\fP structure is already large enough.
+Linux glibc on the other hand does not use a parallel
+.I utmpx
+file
+since its
+.I utmp
+structure is already large enough.
The "x" functions listed above are just aliases for
their counterparts without the "x" (e.g.,
.BR getutxent ()
.fi
.SH DESCRIPTION
.BR getw ()
-reads a word (that is, an \fIint\fP) from \fIstream\fP.
+reads a word (that is, an
+.IR int )
+from
+.IR stream .
It's provided for compatibility with SVr4.
We recommend you use
.BR fread (3)
instead.
.P
.BR putw ()
-writes the word \fIw\fP (that is,
-an \fIint\fP) to \fIstream\fP.
+writes the word
+.I w
+(that is,
+an
+.IR int )
+to
+.IR stream .
It is provided for compatibility with SVr4, but we recommend you use
.BR fwrite (3)
instead.
returns the word read, and
.BR putw ()
returns 0.
-On error, they return \fBEOF\fP.
+On error, they return
+.BR EOF .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
typedef struct {
size_t gl_pathc; /* Count of paths matched so far */
char **gl_pathv; /* List of matched pathnames. */
- size_t gl_offs; /* Slots to reserve in \fIgl_pathv\fP. */
+ size_t gl_offs; /* Slots to reserve in \f[I]gl_pathv\f[]. */
} glob_t;
.EE
.in
.P
First a hash table must be created using
.BR hcreate ().
-The argument \fInel\fP specifies the maximum number of entries
+The argument
+.I nel
+specifies the maximum number of entries
in the table.
(This maximum cannot be changed later, so choose it wisely.)
The implementation may adjust this value upward to improve the
The
.BR hsearch ()
function searches the hash table for an
-item with the same key as \fIitem\fP (where "the same" is determined using
+item with the same key as
+.I item
+(where "the same" is determined using
.BR strcmp (3)),
and if successful returns a pointer to it.
.P
-The argument \fIitem\fP is of type \fIENTRY\fP, which is defined in
-\fI<search.h>\fP as follows:
+The argument
+.I item
+is of type
+.IR ENTRY ,
+which is defined in
+.I <search.h>
+as follows:
.P
.in +4n
.EX
.EE
.in
.P
-The field \fIkey\fP points to a null-terminated string which is the
+The field
+.I key
+points to a null-terminated string which is the
search key.
-The field \fIdata\fP points to data that is associated with that key.
+The field
+.I data
+points to data that is associated with that key.
.P
-The argument \fIaction\fP determines what
+The argument
+.I action
+determines what
.BR hsearch ()
does after an unsuccessful search.
This argument must either have the value
returns a pointer to an entry in the hash table.
.BR hsearch ()
returns NULL on error, that is,
-if \fIaction\fP is \fBENTER\fP and
-the hash table is full, or \fIaction\fP is \fBFIND\fP and \fIitem\fP
+if
+.I action
+is
+.B ENTER
+and the hash table is full,
+or
+.I action
+is
+.B FIND
+and
+.I item
cannot be found in the hash table.
.BR hsearch_r ()
returns nonzero on success, and 0 on error.
then the program must maintain bookkeeping data structures that
allow it to free them.
.SH BUGS
-SVr4 and POSIX.1-2001 specify that \fIaction\fP
-is significant only for unsuccessful searches, so that an \fBENTER\fP
+SVr4 and POSIX.1-2001 specify that
+.I action
+is significant only for unsuccessful searches, so that an
+.B ENTER
should not do anything for a successful search.
In libc and glibc (before glibc 2.3), the
implementation violates the specification,
-updating the \fIdata\fP for the given \fIkey\fP in this case.
+updating the
+.I data
+for the given
+.I key
+in this case.
.P
Individual hash table entries can be added, but not deleted.
.SH EXAMPLES
.I outbytesleft
indicates the number of bytes available in the output buffer.
.P
-The main case is when \fIinbuf\fP is not NULL and \fI*inbuf\fP is not NULL.
+The main case is when
+.I inbuf
+is not NULL and
+.I *inbuf
+is not NULL.
In this case, the
.BR iconv ()
function converts the multibyte sequence
-starting at \fI*inbuf\fP to a multibyte sequence starting at \fI*outbuf\fP.
-At most \fI*inbytesleft\fP bytes, starting at \fI*inbuf\fP, will be read.
-At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
+starting at
+.I *inbuf
+to a multibyte sequence starting at
+.IR *outbuf .
+At most
+.I *inbytesleft
+bytes, starting at
+.IR *inbuf ,
+will be read.
+At most
+.I *outbytesleft
+bytes, starting at
+.IR *outbuf ,
+will be written.
.P
The
.BR iconv ()
-function converts one multibyte character at a time, and for
-each character conversion it increments \fI*inbuf\fP and decrements
-\fI*inbytesleft\fP by the number of converted input bytes, it increments
-\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of converted
-output bytes, and it updates the conversion state contained in \fIcd\fP.
+function converts one multibyte character at a time,
+and for each character conversion it increments
+.I *inbuf
+and decrements
+.I *inbytesleft
+by the number of converted input bytes,
+it increments
+.I *outbuf
+and decrements
+.I *outbytesleft
+by the number of converted output bytes,
+and it updates the conversion state contained in
+.IR cd .
If the character encoding of the input is stateful, the
.BR iconv ()
function can also convert a sequence of input bytes
to an update to the conversion state without producing any output bytes;
-such input is called a \fIshift sequence\fP.
+such input is called a
+.IR shift\~sequence .
The conversion can stop for five reasons:
.IP \[bu] 3
An invalid multibyte sequence is encountered in the input.
In this case,
-it sets \fIerrno\fP to \fBEILSEQ\fP and returns
-.IR (size_t)\ \-1 .
-\fI*inbuf\fP
+it sets
+.I errno
+to
+.B EILSEQ
+and returns
+.IR "(size_t)\ \-1" .
+.I *inbuf
is left pointing to the beginning of the invalid multibyte sequence.
.IP \[bu]
A multibyte sequence is encountered that is valid but that
to
.B EILSEQ
and returns
-.IR (size_t)\ \-1 .
+.IR "(size_t)\ \-1" .
.I *inbuf
is left pointing to the beginning of the unconvertible multibyte sequence.
.IP \[bu]
The input byte sequence has been entirely converted,
-that is, \fI*inbytesleft\fP has gone down to 0.
+that is,
+.I *inbytesleft
+has gone down to 0.
In this case,
.BR iconv ()
returns the number of
.IP \[bu]
An incomplete multibyte sequence is encountered in the input, and the
input byte sequence terminates after it.
-In this case, it sets \fIerrno\fP to
-\fBEINVAL\fP and returns
-.IR (size_t)\ \-1 .
-\fI*inbuf\fP is left pointing to the
+In this case, it sets
+.I errno
+to
+.B EINVAL
+and returns
+.IR "(size_t)\ \-1" .
+.I *inbuf
+is left pointing to the
beginning of the incomplete multibyte sequence.
.IP \[bu]
The output buffer has no more room for the next converted character.
-In this case, it sets \fIerrno\fP to \fBE2BIG\fP and returns
-.IR (size_t)\ \-1 .
+In this case, it sets
+.I errno
+to
+.B E2BIG
+and returns
+.IR "(size_t)\ \-1" .
.P
-A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but
-\fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL.
+A different case is when
+.I inbuf
+is NULL or
+.I *inbuf
+is NULL, but
+.I outbuf
+is not NULL and
+.I *outbuf
+is not NULL.
In this case, the
.BR iconv ()
-function attempts to set \fIcd\fP's conversion state to the
-initial state and store a corresponding shift sequence at \fI*outbuf\fP.
-At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
+function attempts to set
+.IR cd 's
+conversion state to the
+initial state and store a corresponding shift sequence at
+.IR *outbuf .
+At most
+.I *outbytesleft
+bytes, starting at
+.IR *outbuf ,
+will be written.
If the output buffer has no more room for this reset sequence, it sets
-\fIerrno\fP to \fBE2BIG\fP and returns
-.IR (size_t)\ \-1 .
+.I errno
+to
+.B E2BIG
+and returns
+.IR "(size_t)\ \-1" .
Otherwise, it increments
-\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes
+.I *outbuf
+and decrements
+.I *outbytesleft
+by the number of bytes
written.
.P
-A third case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, and
-\fIoutbuf\fP is NULL or \fI*outbuf\fP is NULL.
+A third case is when
+.I inbuf
+is NULL or
+.I *inbuf
+is NULL, and
+.I outbuf
+is NULL or
+.I *outbuf
+is NULL.
In this case, the
.BR iconv ()
-function sets \fIcd\fP's conversion state to the initial state.
+function sets
+.IR cd 's
+conversion state to the initial state.
.SH RETURN VALUE
The
.BR iconv ()
The following errors can occur, among others:
.TP
.B E2BIG
-There is not sufficient room at \fI*outbuf\fP.
+There is not sufficient room at
+.IR *outbuf .
.TP
.B EILSEQ
An invalid multibyte sequence has been encountered in the input.
.SH NOTES
In each series of calls to
.BR iconv (),
-the last should be one with \fIinbuf\fP or \fI*inbuf\fP equal to NULL,
+the last should be one with
+.I inbuf
+or
+.I *inbuf
+equal to NULL,
in order to flush out any partially converted input.
.P
Although
.P
.in +4n
.EX
-$ \fB./a.out\fI
+.RB $ " ./a.out" ;
1: lo
2: wlan0
3: em1
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is 0 or a NaN
+Domain error: \f[I]x\f[] is 0 or a NaN
An invalid floating-point exception
.RB ( FE_INVALID )
is raised, and
.B EDOM
(but see BUGS).
.TP
-Domain error: \fIx\fP is an infinity
+Domain error: \f[I]x\f[] is an infinity
An invalid floating-point exception
.RB ( FE_INVALID )
is raised, and
.fi
.SH DESCRIPTION
.BR inet_aton ()
-converts the Internet host address \fIcp\fP from the
+converts the Internet host address
+.I cp
+from the
IPv4 numbers-and-dots notation into binary form (in network byte order)
-and stores it in the structure that \fIinp\fP points to.
+and stores it in the structure that
+.I inp
+points to.
.BR inet_aton ()
returns nonzero if the address is valid, zero if not.
The address supplied in
The
.BR inet_addr ()
function converts the Internet host address
-\fIcp\fP from IPv4 numbers-and-dots notation into binary data in network
-byte order.
+.I cp
+from IPv4 numbers-and-dots notation into binary data in network byte order.
If the input is invalid,
.B INADDR_NONE
(usually \-1) is returned.
The
.BR inet_ntoa ()
function converts the Internet host address
-\fIin\fP, given in network byte order, to a string in IPv4
-dotted-decimal notation.
+.IR in ,
+given in network byte order,
+to a string in IPv4 dotted-decimal notation.
The string is returned in a statically
allocated buffer, which subsequent calls will overwrite.
.P
The
.BR inet_lnaof ()
function returns the local network address part
-of the Internet address \fIin\fP.
+of the Internet address
+.IR in .
The returned value is in host byte order.
.P
The
.BR inet_netof ()
function returns the network number part of
-the Internet address \fIin\fP.
+the Internet address
+.IR in .
The returned value is in host byte order.
.P
The
and
.BR inet_lnaof ().
It returns an Internet host address in network byte order,
-created by combining the network number \fInet\fP
-with the local address \fIhost\fP, both in
-host byte order.
+created by combining the network number\
+.I net
+with the local address
+.IR host ,
+both in host byte order.
.P
-The structure \fIin_addr\fP as used in
+The structure
+.I in_addr
+as used in
.BR inet_ntoa (),
.BR inet_makeaddr (),
.BR inet_lnaof (),
.P
.in +4n
.EX
-$ \fB./a.out 193.168\fP
+.RB $ " ./a.out 193.168" ;
inet_net_pton() returned: 24
inet_net_ntop() yielded: 193.168.0/24
Raw address: c1a80000
.P
.in +4n
.EX
-$ \fB./a.out 193.168 0xffffffff\fP
+.RB $ " ./a.out 193.168 0xffffffff" ;
inet_net_pton() returned: 24
inet_net_ntop() yielded: 193.168.0/24
Raw address: c1a800ff
.P
.in +4n
.EX
-$ \fB./a.out 193.168.1.128\fP
+.RB $ " ./a.out 193.168.1.128" ;
inet_net_pton() returned: 32
inet_net_ntop() yielded: 193.168.1.128/32
Raw address: c1a80180
.P
.in +4n
.EX
-$ \fB./a.out 193.168.1.128/24\fP
+.RB $ " ./a.out 193.168.1.128/24" ;
inet_net_pton() returned: 24
inet_net_ntop() yielded: 193.168.1/24
Raw address: c1a80180
.I struct in_addr
(in network byte order)
which is converted to an IPv4 network address in
-the dotted-decimal format, "\fIddd.ddd.ddd.ddd\fP".
+the dotted-decimal format,
+.RI \[dq] ddd.ddd.ddd.ddd \[dq].
The buffer
.I dst
must be at least
.B AF_INET
.I src
points to a character string containing an IPv4 network address in
-dotted-decimal format, "\fIddd.ddd.ddd.ddd\fP", where
+dotted-decimal format,
+.RI \[dq] ddd.ddd.ddd.ddd \[dq],
+where
.I ddd
is a decimal number of up to three digits in the range 0 to 255.
The address is converted to a
.P
The
.BR insque ()
-function inserts the element pointed to by \fIelem\fP
-immediately after the element pointed to by \fIprev\fP.
+function inserts the element pointed to by
+.I elem
+immediately after the element pointed to by
+.IR prev .
.P
If the list is linear, then the call
.I "insque(elem, NULL)"
.P
The
.BR remque ()
-function removes the element pointed to by \fIelem\fP from the
-doubly linked list.
+function removes the element pointed to by
+.I elem
+from the doubly linked list.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.SH VERSIONS
On ancient systems,
.\" e.g., SunOS, Linux libc4 and libc5
-the arguments of these functions were of type \fIstruct qelem *\fP,
+the arguments of these functions were of type
+.IR "struct\ qelem\ *" ,
defined as:
.P
.in +4n
This is still what you will get if
.B _GNU_SOURCE
is defined before
-including \fI<search.h>\fP.
+including
+.IR <search.h> .
.P
The location of the prototypes for these functions differs among several
versions of UNIX.
The above is the POSIX version.
-Some systems place them in \fI<string.h>\fP.
-.\" Linux libc4 and libc 5 placed them
-.\" in \fI<stdlib.h>\fP.
+Some systems place them in
+.IR <string.h> .
+.\" Linux libc4 and libc 5 placed them in
+.\" .IR <stdlib.h> .
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
.\" but not by the
.\" .BR cc (1)
.\" C compiler,
-.\" which needs the option \fI\-lm\fP.
+.\" which needs the option \f[I]\-lm\f[].
.\" .IP (3F)
.\" These functions are part of the FORTRAN library libF77. There are no
.\" special compiler flags needed to use these functions.
.TP
.BR isalnum ()
checks for an alphanumeric character; it is equivalent to
-.BI "(isalpha(" c ") || isdigit(" c "))" \fR.
+.IR "(isalpha(c)\ ||\ isdigit(c))" .
.TP
.BR isalpha ()
-checks for an alphabetic character; in the standard \fB"C"\fP
+checks for an alphabetic character; in the standard
+.B \[dq]C\[dq]
locale, it is equivalent to
-.BI "(isupper(" c ") || islower(" c "))" \fR.
+.IR "(isupper(c)\ ||\ islower(c))" .
In some locales, there may be additional characters for which
.BR isalpha ()
is true\[em]letters which are neither uppercase nor lowercase.
.TP
.BR isascii ()
-checks whether \fIc\fP is a 7-bit
+checks whether
+.I c
+is a 7-bit
.I unsigned char
value that fits into
the ASCII character set.
be promoted to real-floating types).
.TP
.BR isgreater ()
-determines \fI(x)\ >\ (y)\fP without an exception
+determines
+.I (x)\ >\ (y)
+without an exception
if
.I x
or
is NaN.
.TP
.BR isgreaterequal ()
-determines \fI(x)\ >=\ (y)\fP without an exception
+determines
+.I (x)\ >=\ (y)
+without an exception
if
.I x
or
is NaN.
.TP
.BR isless ()
-determines \fI(x)\ <\ (y)\fP without an exception
+determines
+.I (x)\ <\ (y)
+without an exception
if
.I x
or
is NaN.
.TP
.BR islessequal ()
-determines \fI(x)\ <=\ (y)\fP without an exception
+determines
+.I (x)\ <=\ (y)
+without an exception
if
.I x
or
is NaN.
.TP
.BR islessgreater ()
-determines \fI(x)\ < (y) || (x) >\ (y)\fP
+determines
+.I (x)\ <\ (y)\ ||\ (x)\ >\ (y)
without an exception if
.I x
or
.I y
is NaN.
-This macro is not equivalent to \fIx\ !=\ y\fP because that expression is
+This macro is not equivalent to
+.I x\ !=\ y
+because that expression is
true if
.I x
or
function is the wide-character equivalent of the
.BR isblank (3)
function.
-It tests whether \fIwc\fP is a wide character
+It tests whether
+.I wc
+is a wide character
belonging to the wide-character class "blank".
.P
The wide-character class "blank" is a subclass of the wide-character class
The
.BR iswblank ()
function returns nonzero
-if \fIwc\fP is a wide character
+if
+.I wc
+is a wide character
belonging to the wide-character class "blank".
Otherwise, it returns zero.
.SH ATTRIBUTES
.P
The following errors can occur:
.TP
-Range error: result underflow, or \fIx\fP is too large in magnitude
+Range error: result underflow, or \f[I]x\f[] is too large in magnitude
.I errno
is set to
.BR ERANGE .
.P
The following errors can occur:
.TP
-Pole error: \fIx\fP is a nonpositive integer
+Pole error: \f[I]x\f[] is a nonpositive integer
.I errno
is set to
.B ERANGE
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is negative
+Domain error: \f[I]x\f[] is negative
.I errno
is set to
.BR EDOM .
.RB ( FE_INVALID )
is raised.
.TP
-Pole error: \fIx\fP is zero
+Pole error: \f[I]x\f[] is zero
.I errno
is set to
.BR ERANGE .
.SH DESCRIPTION
These functions return a value equivalent to
.P
-.nf
- log (1 + \fIx\fP)
-.fi
+.in +4n
+.EX
+log(1 + \f[I]x\f[])
+.EE
+.in
.P
The result is computed in a way
that is accurate even if the value of
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is less than \-1.
+Domain error: \f[I]x\f[] is less than \-1.
.I errno
is set to
.B EDOM
.RB ( FE_INVALID )
is raised.
.TP
-Pole error: \fIx\fP is \-1.
+Pole error: \f[I]x\f[] is \-1.
.I errno
is set to
.B ERANGE
.P
The following errors can occur:
.TP
-Pole error: \fIx\fP is 0
+Pole error: \f[I]x\f[] is 0
.\" .I errno
.\" is set to
.\" .BR ERANGE .
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large
+Domain error: \f[I]x\f[] is a NaN or infinite, or the rounded value is too large
.\" .I errno
.\" is set to
.\" .BR EDOM .
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large
+Domain error: \f[I]x\f[] is a NaN or infinite, or the rounded value is too large
.\" .I errno
.\" is set to
.\" .BR EDOM .
The
.BR makecontext ()
function modifies the context pointed to
-by \fIucp\fP (which was obtained from a call to
+by
+.I ucp
+(which was obtained from a call to
.BR getcontext (3)).
Before invoking
.BR makecontext (),
the caller must allocate a new stack
-for this context and assign its address to \fIucp\->uc_stack\fP,
+for this context and assign its address to
+.IR ucp\->uc_stack ,
and define a successor context and
-assign its address to \fIucp\->uc_link\fP.
+assign its address to
+.IR ucp\->uc_link .
.P
When this context is later activated (using
.BR setcontext (3)
or
.BR swapcontext ())
-the function \fIfunc\fP is called,
+the function
+.I func
+is called,
and passed the series of integer
.RI ( int )
arguments that follow
The
.BR swapcontext ()
function saves the current context in
-the structure pointed to by \fIoucp\fP, and then activates the
-context pointed to by \fIucp\fP.
+the structure pointed to by
+.IR oucp ,
+and then activates
+the context pointed to by
+.IR ucp .
.SH RETURN VALUE
When successful,
.BR swapcontext ()
does not return.
-(But we may return later, in case \fIoucp\fP is
-activated, in which case it looks like
+(But we may return later, in case
+.I oucp
+is activated,
+in which case it looks like
.BR swapcontext ()
returns 0.)
On error,
citing portability issues, and
recommending that applications be rewritten to use POSIX threads instead.
.SH NOTES
-The interpretation of \fIucp\->uc_stack\fP is just as in
+The interpretation of
+.I ucp\->uc_stack
+is just as in
.BR sigaltstack (2),
namely, this struct contains the start and length of a memory area
to be used as the stack, regardless of the direction of growth of
.P
.in +4n
.EX
-$ \fB./a.out 1000 100 2\fP
+.RB $ " ./a.out 1000 100 2" ;
============== Before allocating blocks ==============
Total non\-mmapped bytes (arena): 0
# of free chunks (ordblks): 1
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
main(): returned from first free() call
*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 ***
======= Backtrace: =========
.P
.in +4n
.EX
-$ \fB./a.out 1\fP # Diagnose error and continue
+.RB $ " ./a.out 1" "; # Diagnose error and continue"
main(): returned from first free() call
*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 ***
main(): returned from second free() call
-$ \fB./a.out 2\fP # Abort without error message
+.RB $ " ./a.out 2" "; # Abort without error message"
main(): returned from first free() call
Aborted (core dumped)
-$ \fB./a.out 0\fP # Ignore error and continue
+.RB $ " ./a.out 0" "; # Ignore error and continue"
main(): returned from first free() call
main(): returned from second free() call
.EE
.P
.in +4n
.EX
-$ \fBMALLOC_CHECK_=1 ./a.out\fP
+.RB $ " MALLOC_CHECK_=1 ./a.out" ;
main(): returned from first free() call
*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 ***
main(): returned from second free() call
o/f result overflowed
u/f result underflowed
|x| absolute value of x
-X_TLOSS is a constant defined in \fI<math.h>\fP
+X_TLOSS is a constant defined in \f[I]<math.h>\f[]
.TE
.RE
.\" Details below from glibc 2.8's sysdeps/ieee754/k_standard.c
.SH DESCRIPTION
The
.BR memcmp ()
-function compares the first \fIn\fP bytes (each interpreted as
-.IR "unsigned char" )
-of the memory areas \fIs1\fP and \fIs2\fP.
+function compares the first
+.I n
+bytes (each interpreted as
+.IR "unsigned\ char" )
+of the memory areas
+.I s1
+and
+.IR s2 .
.SH RETURN VALUE
The
.BR memcmp ()
function returns an integer less than, equal to, or
-greater than zero if the first \fIn\fP bytes of \fIs1\fP is found,
-respectively, to be less than, to match, or be greater than the first
-\fIn\fP bytes of \fIs2\fP.
+greater than zero if the first
+.I n
+bytes of
+.I s1
+is found,
+respectively,
+to be less than, to match, or be greater than the first
+.I n
+bytes of
+.IR s2 .
.P
For a nonzero return value, the sign is determined by the sign of
the difference between the first pair of bytes (interpreted as
.SH DESCRIPTION
The
.BR memcpy ()
-function copies \fIn\fP bytes from memory area
-\fIsrc\fP to memory area \fIdest\fP.
+function copies
+.I n
+bytes from memory area
+.I src
+to memory area
+.IR dest .
The memory areas must not overlap.
Use
.BR memmove (3)
.SH RETURN VALUE
The
.BR memcpy ()
-function returns a pointer to \fIdest\fP.
+function returns a pointer to
+.IR dest .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.SH DESCRIPTION
The
.BR memfrob ()
-function obfuscates the first \fIn\fP bytes of the
-memory area \fIs\fP by exclusive-ORing each character with the number
+function obfuscates the first
+.I n
+bytes of the memory area
+.I s
+by exclusive-ORing each character with the number
42.
The effect can be reversed by using
.BR memfrob ()
The
.BR mkdtemp ()
function generates a uniquely named temporary
-directory from \fItemplate\fP.
-The last six characters of \fItemplate\fP
+directory from
+.IR template .
+The last six characters of
+.I template
must be XXXXXX and these are replaced with a string that makes the
directory name unique.
The directory is then created with
.SH ERRORS
.TP
.B EINVAL
-The last six characters of \fItemplate\fP were not XXXXXX.
-Now \fItemplate\fP is unchanged.
+The last six characters of
+.I template
+were not XXXXXX.
+Now
+.I template
+is unchanged.
.P
Also see
.BR mkdir (2)
-for other possible values for \fIerrno\fP.
+for other possible values for
+.IR errno .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.fi
.SH DESCRIPTION
.BR mkfifo ()
-makes a FIFO special file with name \fIpathname\fP.
-\fImode\fP specifies the FIFO's permissions.
+makes a FIFO special file with name
+.IR pathname .
+.I mode
+specifies the FIFO's permissions.
It is modified by the
-process's \fBumask\fP in the usual way: the permissions of the created
-file are \fB(\fP\fImode\fP\fB & \[ti]umask)\fP.
+process's
+.B umask
+in the usual way:
+the permissions of the created file are
+.IR "(mode\ &\ \[ti]umask)" .
.P
A FIFO special file is similar to a pipe, except that it is created
in a different way.
.SH ERRORS
.TP
.B EACCES
-One of the directories in \fIpathname\fP did not allow search
-(execute) permission.
+One of the directories in
+.I pathname
+did not allow search (execute) permission.
.TP
.B EBADF
.RB ( mkfifoat ())
exhausted.
.TP
.B EEXIST
-\fIpathname\fP already exists.
+.I pathname
+already exists.
This includes the case where
.I pathname
is a symbolic link, dangling or not.
.TP
.B ENAMETOOLONG
-Either the total length of \fIpathname\fP is greater than
-\fBPATH_MAX\fP, or an individual filename component has a length
-greater than \fBNAME_MAX\fP.
+Either the total length of
+.I pathname
+is greater than
+.BR PATH_MAX ,
+or an individual filename component has a length
+greater than
+.BR NAME_MAX .
In the GNU system, there is no imposed
limit on overall filename length, but some filesystems may place
limits on the length of a component.
.TP
.B ENOENT
-A directory component in \fIpathname\fP does not exist or is a
+A directory component in
+.I pathname
+does not exist or is a
dangling symbolic link.
.TP
.B ENOSPC
The directory or filesystem has no room for the new file.
.TP
.B ENOTDIR
-A component used as a directory in \fIpathname\fP is not, in fact, a
-directory.
+A component used as a directory in
+.I pathname
+is not, in fact,
+a directory.
.TP
.B ENOTDIR
.RB ( mkfifoat ())
is a file descriptor referring to a file other than a directory.
.TP
.B EROFS
-\fIpathname\fP refers to a read-only filesystem.
+.I pathname
+refers to a read-only filesystem.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.TP
.B EEXIST
Could not create a unique temporary filename.
-Now the contents of \fItemplate\fP are undefined.
+Now the contents of
+.I template
+are undefined.
.TP
.B EINVAL
For
.BR mkstemp ()
and
.BR mkostemp ():
-The last six characters of \fItemplate\fP were not XXXXXX;
-now \fItemplate\fP is unchanged.
+The last six characters of
+.I template
+were not XXXXXX;
+now
+.I template
+is unchanged.
.IP
For
.BR mkstemps ()
The
.BR mktemp ()
function generates a unique temporary filename
-from \fItemplate\fP.
-The last six characters of \fItemplate\fP must
-be XXXXXX and these are replaced with a string that makes the
+from
+.IR template .
+The last six characters of
+.I template
+must be XXXXXX
+and these are replaced with a string that makes the
filename unique.
Since it will be modified,
.I template
.SH RETURN VALUE
The
.BR mktemp ()
-function always returns \fItemplate\fP.
-If a unique name was created, the last six bytes of \fItemplate\fP will
-have been modified in such a way that the resulting name is unique
+function always returns
+.IR template .
+If a unique name was created, the last six bytes of
+.I template
+will have been modified in such a way that the resulting name is unique
(i.e., does not exist already)
If a unique name could not be created,
-\fItemplate\fP is made an empty string, and
+.I template
+is made an empty string, and
.I errno
is set to indicate the error.
.SH ERRORS
.TP
.B EINVAL
-The last six characters of \fItemplate\fP were not XXXXXX.
+The last six characters of
+.I template
+were not XXXXXX.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.P
.in +4n
.EX
-$ \fB./a.out /testq\fP
+.RB $ " ./a.out /testq" ;
Maximum # of messages on queue: 10
Maximum message size: 8192
.EE
.P
.in +4n
.EX
-$ \fBuname \-sr\fP
+.RB $ " uname \-sr" ;
Linux 3.8.0
-$ \fBcat /proc/sys/fs/mqueue/msg_default\fP
+.RB $ " cat /proc/sys/fs/mqueue/msg_default" ;
10
-$ \fBcat /proc/sys/fs/mqueue/msgsize_default\fP
+.RB $ " cat /proc/sys/fs/mqueue/msgsize_default" ;
8192
.EE
.in
.P
.in +4n
.EX
-$ \fB./a.out fr_FR\fP
+.RB $ " ./a.out fr_FR" ;
123456,789
Fri Mar 7 00:25:08 2014
.EE
.P
.in +4n
.EX
-$ \fB./a.out fr_FR it_IT\fP
+.RB $ " ./a.out fr_FR it_IT" ;
123456,789
ven 07 mar 2014 00:26:01 CET
.EE
.BR localeconv (3).
.BR nl_langinfo ()
returns a string which is the value corresponding to
-\fIitem\fP in the program's current global
-locale.
+.I item
+in the program's current global locale.
.BR nl_langinfo_l ()
-returns a string which is the value corresponding to \fIitem\fP
-for the locale identified by the locale object \fIlocale\fP,
+returns a string which is the value corresponding to
+.I item
+for the locale identified by the locale object
+.IR locale ,
which was previously created by
.BR newlocale (3).
Individual and additional elements of the locale categories can
be queried.
.P
-Examples for the locale elements that can be specified in \fIitem\fP
-using the constants defined in \fI<langinfo.h>\fP are:
+Examples for the locale elements that can be specified in
+.I item
+using the constants defined in
+.I <langinfo.h>
+are:
.TP
.BR CODESET \ (LC_CTYPE)
Return a string with the name of the character encoding used in the
conversion specification).
.TP
.BR DAY_ "{1\[en]7} (LC_TIME)"
-Return name of the \fIn\fP-th day of the week.
+Return name of the
+.IR n -th
+day of the week.
[Warning: this follows
the US convention DAY_1 = Sunday, not the international convention
(ISO\~8601) that Monday is the first day of the week.]
conversion specification.)
.TP
.BR ABDAY_ "{1\[en]7} (LC_TIME)"
-Return abbreviated name of the \fIn\fP-th day of the week.
+Return abbreviated name of the
+.IR n -th
+day of the week.
(Used in
.B %a
.BR strftime (3)
conversion specification.)
.TP
.BR MON_ "{1\[en]12} (LC_TIME)"
-Return name of the \fIn\fP-th month.
+Return name of the
+.IR n -th
+month.
(Used in
.B %B
.BR strftime (3)
conversion specification.)
.TP
.BR ABMON_ "{1\[en]12} (LC_TIME)"
-Return abbreviated name of the \fIn\fP-th month.
+Return abbreviated name of the
+.IR n -th
+month.
(Used in
.B %b
.BR strftime (3)
.I langinfo
data is not defined.
.P
-If \fIitem\fP is not valid, a pointer to an empty string is returned.
+If
+.I item
+is not valid, a pointer to an empty string is returned.
.P
The pointer returned by these functions may point to static data that
may be overwritten, or the pointer itself may be invalidated,
The
.BR opendir ()
function opens a directory stream corresponding to the
-directory \fIname\fP, and returns a pointer to the directory stream.
+directory
+.IR name ,
+and returns a pointer to the directory stream.
The stream is positioned at the first entry in the directory.
.P
The
The system-wide limit on the total number of open files has been reached.
.TP
.B ENOENT
-Directory does not exist, or \fIname\fP is an empty string.
+Directory does not exist, or
+.I name
+is an empty string.
.TP
.B ENOMEM
Insufficient memory to complete the operation.
.TP
.B ENOTDIR
-\fIname\fP is not a directory.
+.I name
+is not a directory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.P
.B #include <errno.h>
.P
-.BI "int " errno "; \fR/* Not really declared this way; see errno(3) */"
+.BI "int " errno "; \f[R]/* Not really declared this way; see errno(3) */\f[]"
.P
.BI "[[deprecated]] const char *const " sys_errlist [];
.BI "[[deprecated]] int " sys_nerr ;
and
.BR pvalloc ()
return a pointer to the allocated memory on success.
-On error, NULL is returned, and \fIerrno\fP is set
+On error, NULL is returned, and
+.I errno
+is set
to indicate the error.
.P
.BR posix_memalign ()
.SS Headers
Everybody agrees that
.BR posix_memalign ()
-is declared in \fI<stdlib.h>\fP.
+is declared in
+.IR <stdlib.h> .
.P
On some systems
.BR memalign ()
-is declared in \fI<stdlib.h>\fP instead of \fI<malloc.h>\fP.
+is declared in
+.I <stdlib.h>
+instead of
+.IR <malloc.h> .
.P
According to SUSv2,
.BR valloc ()
-is declared in \fI<stdlib.h>\fP.
+is declared in
+.IR <stdlib.h> .
.\" Libc4,5 and
-glibc declares it in \fI<malloc.h>\fP, and also in
-\fI<stdlib.h>\fP
+glibc declares it in
+.IR <malloc.h> ,
+and also in
+.I <stdlib.h>
if suitable feature test macros are defined (see above).
.SH NOTES
On many systems there are alignment restrictions, for example, on buffers
.I spawn-flags
element of the attributes object pointed to by
.I attrp
-does \fInot\fP contain
+does
+.I not
+contain
.BR POSIX_SPAWN_SETSIGMASK ,
.BR POSIX_SPAWN_SETSIGDEF ,
.BR POSIX_SPAWN_SETSCHEDPARAM ,
.P
Even when these functions return a success status,
the child process may still fail for a plethora of reasons related to its
-pre-\fBexec\fR() initialization.
+.RB pre- exec ()
+initialization.
In addition, the
.BR exec (3)
may fail.
.P
.in +4n
.EX
-$ \fB./a.out date\fP
+.RB $ " ./a.out date" ;
PID of child: 7634
Tue Feb 1 19:47:50 CEST 2011
Child status: exited, status=0
.P
.in +4n
.EX
-$ \fB./a.out \-c date\fP
+.RB $ " ./a.out \-c date" ;
PID of child: 7636
date: write error: Bad file descriptor
Child status: exited, status=1
.P
.in +4n
.EX
-$ \fB./a.out \-s sleep 60 &\fP
+.RB $ " ./a.out \-s sleep 60 &"
[1] 7637
$ PID of child: 7638
.P
-$ \fBkill 7638\fP
-$ \fBkill \-KILL 7638\fP
+.RB $ " kill 7638" ;
+.RB $ " kill \-KILL 7638" ;
$ Child status: killed by signal 9
[1]+ Done ./a.out \-s sleep 60
.EE
.P
.in +4n
.EX
-$ \fB./a.out xxxxx
+.RB $ " ./a.out xxxxx" ;
PID of child: 10190
Child status: exited, status=127
.EE
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is negative, and \fIy\fP is a finite noninteger
+Domain error: \f[I]x\f[] is negative, and \f[I]y\f[] is a finite noninteger
.I errno
is set to
.BR EDOM .
.RB ( FE_INVALID )
is raised.
.TP
-Pole error: \fIx\fP is zero, and \fIy\fP is negative
+Pole error: \f[I]x\f[] is zero, and \f[I]y\f[] is negative
.I errno
is set to
.B ERANGE
One can also specify explicitly which argument is taken,
at each place where an argument is required, by writing "%m$" instead
of \[aq]%\[aq] and "*m$" instead of \[aq]*\[aq],
-where the decimal integer \fIm\fP denotes
-the position in the argument list of the desired argument, indexed starting
-from 1.
+where the decimal integer
+.I m
+denotes the position in the argument list of the desired argument,
+indexed starting from 1.
Thus,
.P
.in +4n
than the field width, it will be padded with spaces on the left
(or right, if the left-adjustment flag has been given).
Instead of a decimal digit string one may write "*" or "*m$"
-(for some decimal integer \fIm\fP) to specify that the field width
-is given in the next argument, or in the \fIm\fP-th argument, respectively,
+(for some decimal integer
+.IR m )
+to specify that the field width
+is given in the next argument,
+or in the
+.IR m -th
+argument,
+respectively,
which must be of type
.IR int .
A negative field width is taken as a \[aq]\-\[aq] flag followed by a
An optional precision, in the form of a period (\[aq].\[aq]) followed by an
optional decimal digit string.
Instead of a decimal digit string one may write "*" or "*m$"
-(for some decimal integer \fIm\fP) to specify that the precision
-is given in the next argument, or in the \fIm\fP-th argument, respectively,
+(for some decimal integer
+.IR m )
+to specify that the precision
+is given in the next argument,
+or in the
+.IR m -th
+argument,
+respectively,
which must be of type
.IR int .
If the precision is given as just \[aq].\[aq], the precision is taken to
.BR \[aq] .
.P
.\" Linux libc4 knows about the five C standard flags.
-.\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
+.\" It knows about the length modifiers \f[B]h\f[], \f[B]l\f[], \f[B]L\f[],
.\" and the conversions
-.\" \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP,
-.\" \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP,
-.\" \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP,
-.\" where \fBF\fP is a synonym for \fBf\fP.
-.\" Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms
-.\" for \fBld\fP, \fBlo\fP, and \fBlu\fP.
+.\" \f[B]c\f[], \f[B]d\f[], \f[B]e\f[], \f[B]E\f[], \f[B]f\f[], \f[B]F\f[],
+.\" \f[B]g\f[], \f[B]G\f[], \f[B]i\f[], \f[B]n\f[], \f[B]o\f[], \f[B]p\f[],
+.\" \f[B]s\f[], \f[B]u\f[], \f[B]x\f[], and \f[B]X\f[],
+.\" where \f[B]F\f[] is a synonym for \f[B]f\f[].
+.\" Additionally, it accepts \f[B]D\f[], \f[B]O\f[], and \f[B]U\f[] as synonyms
+.\" for \f[B]ld\f[], \f[B]lo\f[], and \f[B]lu\f[].
.\" (This is bad, and caused serious bugs later, when
-.\" support for \fB%D\fP disappeared.)
+.\" support for \f[B]%D\f[] disappeared.)
.\" No locale-dependent radix character,
.\" no thousands' separator, no NaN or infinity, no "%m$" and "*m$".
.\" .P
.\" Linux libc5 knows about the five C standard flags and the \[aq] flag,
.\" locale, "%m$" and "*m$".
-.\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
-.\" \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP
-.\" both for \fIlong double\fP and for \fIlong long\fP (this is a bug).
-.\" It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP,
+.\" It knows about the length modifiers \f[B]h\f[], \f[B]l\f[], \f[B]L\f[],
+.\" \f[B]Z\f[], and \f[B]q\f[], but accepts \f[B]L\f[] and \f[B]q\f[]
+.\" both for \f[I]long double\f[] and for \f[I]long long\f[] (this is a bug).
+.\" It no longer recognizes \f[B]F\f[], \f[B]D\f[], \f[B]O\f[], and \f[B]U\f[],
.\" but adds the conversion character
.\" .BR m ,
.\" which outputs
.\" .IR strerror(errno) .
.\" .P
-.\" glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP.
+.\" glibc 2.0 adds conversion characters \f[B]C\f[] and \f[B]S\f[].
.\" .P
-glibc 2.1 adds length modifiers \fBhh\fP, \fBj\fP, \fBt\fP, and \fBz\fP
-and conversion characters \fBa\fP and \fBA\fP.
+glibc 2.1 adds length modifiers
+.BR hh ,
+.BR j ,
+.BR t ,
+and
+.B z
+and conversion characters
+.B a
+and
+.BR A .
.P
-glibc 2.2 adds the conversion character \fBF\fP with C99 semantics,
-and the flag character \fBI\fP.
+glibc 2.2 adds the conversion character
+.B F
+with C99 semantics,
+and the flag character
+.BR I .
.P
glibc 2.35 gives a meaning to the alternate form
.RB ( # )
may contain a % character.
If
.I foo
-comes from untrusted user input, it may contain \fB%n\fP, causing the
+comes from untrusted user input, it may contain
+.BR %n ,
+causing the
.BR printf ()
call to write to memory and creating a security hole.
.\" .P
.SH DESCRIPTION
The
.BR psignal ()
-function displays a message on \fIstderr\fP
-consisting of the string \fIs\fP, a colon, a space, a string
-describing the signal number \fIsig\fP, and a trailing newline.
-If the string \fIs\fP is NULL or empty, the colon and space are omitted.
-If \fIsig\fP is invalid,
+function displays a message on
+.I stderr
+consisting of the string
+.IR s ,
+a colon,
+a space,
+a string
+describing the signal number
+.IR sig ,
+and a trailing newline.
+If the string
+.I s
+is NULL or empty, the colon and space are omitted.
+If
+.I sig
+is invalid,
the message displayed will indicate an unknown signal.
.P
The
and
.BR pthread_cleanup_pop ()
to be implemented as macros that expand to text
-containing \[aq]\fB{\fP\[aq] and \[aq]\fB}\fP\[aq], respectively.
+containing
+.RB \[aq] { \[aq]
+and
+.RB \[aq] } \[aq],
+respectively.
For this reason, the caller must ensure that calls to these
functions are paired within the same function,
and at the same lexical nesting level.
functions
.I are
implemented as macros that expand to text
-containing \[aq]\fB{\fP\[aq] and \[aq]\fB}\fP\[aq], respectively.
+containing
+.RB \[aq] { \[aq]
+and
+.RB \[aq] } \[aq],
+respectively.
This means that variables declared within the scope of
paired calls to these functions will be visible within only that scope.
.P
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
New thread started
cnt = 0
cnt = 1
.P
.in +4n
.EX
-$ \fB./a.out x\fP
+.RB $ " ./a.out x" ;
New thread started
cnt = 0
cnt = 1
.P
.in +4n
.EX
-$ \fB./a.out x 1\fP
+.RB $ " ./a.out x 1" ;
New thread started
cnt = 0
cnt = 1
.
.
.SH DESCRIPTION
-A condition (short for ``condition variable'')
+A condition (short for "condition variable")
is a synchronization device that allows threads
to suspend execution and relinquish the processors
until some predicate on shared data is satisfied.
and another thread signals the condition
just before the first thread actually waits on it.
.P
-\fBpthread_cond_init\fP initializes the condition variable \fIcond\fP,
-using the condition attributes specified in \fIcond_attr\fP,
-or default attributes if \fIcond_attr\fP is \fBNULL\fP.
+.BR pthread_cond_init ()
+initializes the condition variable
+.IR cond ,
+using the condition attributes specified in
+.IR cond_attr ,
+or default attributes if
+.I cond_attr
+is NULL.
The LinuxThreads implementation supports no attributes for conditions,
-hence the \fIcond_attr\fP parameter is actually ignored.
+hence the
+.I cond_attr
+parameter is actually ignored.
.P
-Variables of type \fBpthread_cond_t\fP can also be initialized statically,
-using the constant \fBPTHREAD_COND_INITIALIZER\fP.
+Variables of type
+.I pthread_cond_t
+can also be initialized statically,
+using the constant
+.BR PTHREAD_COND_INITIALIZER .
.P
-\fBpthread_cond_signal\fP restarts one of the threads that
-are waiting on the condition variable \fIcond\fP.
-If no threads are waiting on \fIcond\fP,
+.BR pthread_cond_signal ()
+restarts one of the threads that
+are waiting on the condition variable
+.IR cond .
+If no threads are waiting on
+.IR cond ,
nothing happens.
-If several threads are waiting on \fIcond\fP,
+If several threads are waiting on
+.IR cond ,
exactly one is restarted,
but it is not specified which.
.P
-\fBpthread_cond_broadcast\fP restarts all the threads that
-are waiting on the condition variable \fIcond\fP.
-Nothing happens if no threads are waiting on \fIcond\fP.
+.BR pthread_cond_broadcast ()
+restarts all the threads that
+are waiting on the condition variable
+.IR cond .
+Nothing happens if no threads are waiting on
+.IR cond .
.P
-\fBpthread_cond_wait\fP atomically unlocks the \fImutex\fP
-(as per \fBpthread_unlock_mutex\fP)
-and waits for the condition variable \fIcond\fP to be signaled.
+.BR pthread_cond_wait ()
+atomically unlocks the
+.I mutex
+(as per
+.BR pthread_unlock_mutex ())
+and waits for the condition variable
+.I cond
+to be signaled.
The thread execution is suspended and does not consume any CPU time
until the condition variable is signaled.
-The \fImutex\fP must be locked by the calling thread
-on entrance to \fBpthread_cond_wait\fP.
+The
+.I mutex
+must be locked by the calling thread
+on entrance to
+.BR pthread_cond_wait ().
Before returning to the calling thread,
-\fBpthread_cond_wait\fP re-acquires \fImutex\fP
-(as per \fBpthread_mutex_lock\fP).
+.BR pthread_cond_wait ()
+re-acquires
+.I mutex
+(as per
+.BR pthread_mutex_lock ()).
.P
Unlocking the mutex and suspending on the condition variable is done atomically.
Thus,
between the time a thread locks the mutex
and the time it waits on the condition variable.
.P
-\fBpthread_cond_timedwait\fP atomically unlocks \fImutex\fP
-and waits on \fIcond\fP,
-as \fBpthread_cond_wait\fP does,
+.BR pthread_cond_timedwait ()
+atomically unlocks
+.I mutex
+and waits on
+.IR cond ,
+as
+.BR pthread_cond_wait ()
+does,
but it also bounds the duration of the wait.
-If \fIcond\fP has not been signaled
-within the amount of time specified by \fIabstime\fP,
-the mutex \fImutex\fP is re-acquired
-and \fBpthread_cond_timedwait\fP returns the error \fBETIMEDOUT\fP.
-The \fIabstime\fP parameter specifies an absolute time,
-with the same origin as \fBtime\fP(2) and \fBgettimeofday\fP(2):
-an \fIabstime\fP of 0
+If
+.I cond
+has not been signaled
+within the amount of time specified by
+.IR abstime ,
+the mutex
+.I mutex
+is re-acquired
+and
+.BR pthread_cond_timedwait ()
+returns the error
+.BR ETIMEDOUT .
+The
+.I abstime
+parameter specifies an absolute time,
+with the same origin as
+.BR time (2)
+and
+.BR gettimeofday (2):
+an
+.I abstime
+of 0
corresponds to 00:00:00 GMT, January 1, 1970.
.P
-\fBpthread_cond_destroy\fP destroys a condition variable,
+.BR pthread_cond_destroy ()
+destroys a condition variable,
freeing the resources it might hold.
No threads must be waiting on the condition variable
-on entrance to \fBpthread_cond_destroy\fP.
+on entrance to
+.BR pthread_cond_destroy ().
In the LinuxThreads implementation,
no resources are associated with condition variables,
-thus \fBpthread_cond_destroy\fP actually does nothing
+thus
+.BR pthread_cond_destroy ()
+actually does nothing
except checking that the condition has no waiting threads.
.
.
.SH CANCELLATION
-\fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP
+.BR pthread_cond_wait ()
+and
+.BR pthread_cond_timedwait ()
are cancelation points.
If a thread is cancelled while suspended in one of these functions,
the thread immediately resumes execution,
-then locks again the \fImutex\fP
-argument to \fBpthread_cond_wait\fP and \fBpthread_cond_timedwait\fP,
+then locks again the
+.I mutex
+argument to
+.BR pthread_cond_wait ()
+and
+.BR pthread_cond_timedwait (),
and finally executes the cancelation.
Consequently,
-cleanup handlers are assured that \fImutex\fP is locked
+cleanup handlers are assured that
+.I mutex
+is locked
when they are called.
.
.
The condition functions are not async-signal safe,
and should not be called from a signal handler.
In particular,
-calling \fBpthread_cond_signal\fP or \fBpthread_cond_broadcast\fP
+calling
+.BR pthread_cond_signal ()
+or
+.BR pthread_cond_broadcast ()
from a signal handler
may deadlock the calling thread.
.
.
.
.SH ERRORS
-\fBpthread_cond_init\fP,
-\fBpthread_cond_signal\fP,
-\fBpthread_cond_broadcast\fP,
-and \fBpthread_cond_wait\fP
+.BR pthread_cond_init (),
+.BR pthread_cond_signal (),
+.BR pthread_cond_broadcast (),
+and
+.BR pthread_cond_wait ()
never return an error code.
.P
-The \fBpthread_cond_timedwait\fP function returns
+The
+.BR pthread_cond_timedwait ()
+function returns
the following error codes on error:
.RS
.TP
-\fBETIMEDOUT\fP
+.B ETIMEDOUT
The condition variable was not signaled
-until the timeout specified by \fIabstime\fP.
+until the timeout specified by
+.I abstime .
.RE
.P
-The \fBpthread_cond_destroy\fP function returns
+The
+.BR pthread_cond_destroy ()
+function returns
the following error code on error:
.RS
.TP
-\fBEBUSY\fP
-Some threads are currently waiting on \fIcond\fP.
+.B EBUSY
+Some threads are currently waiting on
+.I cond .
.RE
.
.
.SH "SEE ALSO"
-\fBpthread_condattr_init\fP(3),
-\fBpthread_mutex_lock\fP(3),
-\fBpthread_mutex_unlock\fP(3),
-\fBgettimeofday\fP(2),
-\fBnanosleep\fP(2).
+.BR pthread_condattr_init (3),
+.BR pthread_mutex_lock (3),
+.BR pthread_mutex_unlock (3),
+.BR gettimeofday (2),
+.BR nanosleep (2).
.
.
.SH EXAMPLE
-Consider two shared variables \fIx\fP and \fIy\fP,
-protected by the mutex \fImut\fP,
-and a condition variable \fIcond\fP
+Consider two shared variables
+.I x
+and
+.I y ,
+protected by the mutex
+.IR mut ,
+and a condition variable
+.I cond
that is to be signaled
-whenever \fIx\fP becomes greater than \fIy\fP.
+whenever
+.I x
+becomes greater than
+.IR y .
.P
.RS
.ft 3
.RE
.fi
.P
-Waiting until \fIx\fP is greater than \fIy\fP is performed as follows:
+Waiting until
+.I x
+is greater than
+.I y
+is performed as follows:
.P
.RS
.ft 3
.RE
.fi
.P
-Modifications on \fIx\fP and \fIy\fP
-that may cause \fIx\fP to become greater than \fIy\fP
+Modifications on
+.I x
+and
+.I y
+that may cause
+.I x
+to become greater than
+.I y
should signal the condition if needed:
.P
.RS
.P
If it can be proved that at most one waiting thread needs to be waken up
(for instance,
-if there are only two threads communicating through \fIx\fP and \fIy\fP),
-\fBpthread_cond_signal\fP can be used as
-a slightly more efficient alternative to \fBpthread_cond_broadcast\fP.
+if there are only two threads communicating through
+.I x
+and
+.IR y ),
+.BR pthread_cond_signal ()
+can be used as
+a slightly more efficient alternative to
+.BR pthread_cond_broadcast ().
In doubt,
-use \fBpthread_cond_broadcast\fP.
+use
+.BR pthread_cond_broadcast ().
.P
-To wait for \fIx\fP to become greater than \fIy\fP
+To wait for
+.I x
+to become greater than
+.I y
with a timeout of 5 seconds,
do:
.P
.SH DESCRIPTION
Condition attributes can be specified at condition creation time,
by passing a condition attribute object
-as second argument to \fBpthread_cond_init\fP(3).
-Passing \fBNULL\fP is equivalent to
+as second argument to
+.BR pthread_cond_init (3).
+Passing NULL is equivalent to
passing a condition attribute object
with all attributes set to their default values.
.P
The functions on condition attributes are
included only for compliance with the POSIX standard.
.P
-\fBpthread_condattr_init\fP
-initializes the condition attribute object \fIattr\fP
+.BR pthread_condattr_init ()
+initializes the condition attribute object
+.I attr
and fills it with default values for the attributes.
-\fBpthread_condattr_destroy\fP destroys a condition attribute object,
+.BR pthread_condattr_destroy ()
+destroys a condition attribute object,
which must not be reused until it is reinitialized.
Both functions do nothing in the LinuxThreads implementation.
.
.
.SH "RETURN VALUE"
-\fBpthread_condattr_init\fP and \fBpthread_condattr_destroy\fP always return 0.
+.BR pthread_condattr_init ()
+and
+.BR pthread_condattr_destroy ()
+always return 0.
.
.
.SH "SEE ALSO"
-\fBpthread_cond_init\fP(3).
+.BR pthread_cond_init (3).
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
Stack size: 8388608
Guard size: 4096
Scheduling policy: SCHED_OTHER
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
Main thread sleeping
Subthread starting infinite loop
Main thread consuming some CPU time...
the thread-specific data area,
or TSD area for short.
This area is indexed by TSD keys.
-The TSD area associates values of type \fBvoid *\fP to TSD keys.
+The TSD area associates values of type
+.I void\ *
+to TSD keys.
TSD keys are common to all threads,
but the value associated with a given TSD key
can be different in each thread.
.P
For concreteness,
-the TSD areas can be viewed as arrays of \fBvoid *\fP pointers,
+the TSD areas can be viewed as arrays of
+.I void\ *
+pointers,
TSD keys as integer indices into these arrays,
and the value of a TSD key
as the value of the corresponding array element in the calling thread.
.P
When a thread is created,
-its TSD area initially associates \fBNULL\fP with all keys.
+its TSD area initially associates NULL with all keys.
.P
-\fBpthread_key_create\fP allocates a new TSD key.
-The key is stored in the location pointed to by \fIkey\fP.
-There is a limit of \fBPTHREAD_KEYS_MAX\fP
+.BR pthread_key_create ()
+allocates a new TSD key.
+The key is stored in the location pointed to by
+.IR key .
+There is a limit of
+.B PTHREAD_KEYS_MAX
on the number of keys allocated at a given time.
The value initially associated with the returned key
-is \fBNULL\fP in all currently executing threads.
+is NULL in all currently executing threads.
.P
-The \fIdestr_function\fP argument,
-if not \fBNULL\fP,
+The
+.I destr_function
+argument,
+if not NULL,
specifies a destructor function associated with the key.
-When a thread terminates via \fBpthread_exit\fP or by cancelation,
-\fIdestr_function\fP is called with arguments
+When a thread terminates via
+.BR pthread_exit ()
+or by cancelation,
+.I destr_function
+is called with arguments
the value associated with the key in that thread.
-The \fIdestr_function\fP is not called if that value is \fBNULL\fP.
+The
+.I destr_function
+is not called if that value is NULL.
The order in which destructor functions are called at thread termination time
is unspecified.
.P
Before the destructor function is called,
-the \fBNULL\fP value is associated with the key in the current thread.
+the NULL value is associated with the key in the current thread.
A destructor function might,
however,
-re-associate non-\fBNULL\fP values to that key or some other key.
+re-associate non-NULL values to that key or some other key.
To deal with this,
if after all the destructors have been called
-for all non-\fBNULL\fP values,
-there are still some non-\fBNULL\fP values with associated destructors,
+for all non-NULL values,
+there are still some non-NULL values with associated destructors,
then the process is repeated.
The glibc implementation stops the process
-after \fBPTHREAD_DESTRUCTOR_ITERATIONS\fP iterations,
-even if some non-\fBNULL\fP values with associated descriptors remain.
+after
+.B PTHREAD_DESTRUCTOR_ITERATIONS
+iterations,
+even if some non-NULL values with associated descriptors remain.
Other implementations may loop indefinitely.
.P
-\fBpthread_key_delete\fP deallocates a TSD key.
+.BR pthread_key_delete ()
+deallocates a TSD key.
It does not check
-whether non-\fBNULL\fP values are associated with that key
+whether non-NULL values are associated with that key
in the currently executing threads,
nor call the destructor function associated with the key.
.P
-\fBpthread_setspecific\fP changes the value
-associated with \fIkey\fP in the calling thread,
-storing the given \fIpointer\fP instead.
+.BR pthread_setspecific ()
+changes the value
+associated with
+.I key
+in the calling thread,
+storing the given
+.I pointer
+instead.
.P
-\fBpthread_getspecific\fP returns the value
-currently associated with \fIkey\fP in the calling thread.
+.BR pthread_getspecific ()
+returns the value
+currently associated with
+.I key
+in the calling thread.
.
.
.SH "RETURN VALUE"
-\fBpthread_key_create\fP,
-\fBpthread_key_delete\fP,
-and \fBpthread_setspecific\fP
+.BR pthread_key_create (),
+.BR pthread_key_delete (),
+and
+.BR pthread_setspecific ()
return 0 on success and a non-zero error code on failure.
If successful,
-\fBpthread_key_create\fP stores the newly allocated key
-in the location pointed to by its \fIkey\fP argument.
+.BR pthread_key_create ()
+stores the newly allocated key
+in the location pointed to by its
+.I key
+argument.
.P
-\fBpthread_getspecific\fP returns
-the value associated with \fIkey\fP on success,
-and \fBNULL\fP on error.
+.BR pthread_getspecific ()
+returns
+the value associated with
+.I key
+on success,
+and NULL on error.
.
.
.SH ERRORS
-\fBpthread_key_create\fP returns the following error code on error:
+.BR pthread_key_create ()
+returns the following error code on error:
.RS
.TP
-\fBEAGAIN\fP
-\fBPTHREAD_KEYS_MAX\fP keys are already allocated.
+.B EAGAIN
+.B PTHREAD_KEYS_MAX
+keys are already allocated.
.RE
.P
-\fBpthread_key_delete\fP and \fBpthread_setspecific\fP return
+.BR pthread_key_delete ()
+and
+.BR pthread_setspecific ()
+return
the following error code on error:
.RS
.TP
-\fBEINVAL\fP
-\fIkey\fP is not a valid, allocated TSD key.
+.B EINVAL
+.I key
+is not a valid, allocated TSD key.
.RE
.P
-\fBpthread_getspecific\fP returns \fBNULL\fP if \fIkey\fP is not a valid,
+.BR pthread_getspecific ()
+returns NULL if
+.I key
+is not a valid,
allocated TSD key.
.
.
that is already locked by another thread
is suspended until the owning thread unlocks the mutex first.
.P
-\fBpthread_mutex_init\fP initializes the mutex object pointed to by \fImutex\fP
-according to the mutex attributes specified in \fImutexattr\fP.
-If \fImutexattr\fP is \fBNULL\fP,
+.BR pthread_mutex_init ()
+initializes the mutex object pointed to by
+.I mutex
+according to the mutex attributes specified in
+.IR mutexattr .
+If
+.I mutexattr
+is NULL,
default attributes are used instead.
.P
The LinuxThreads implementation supports only one mutex attributes,
-the \fImutex kind\fP,
-which is either ``fast'',
-``recursive'',
-or ``error checking''.
+the
+.IR "mutex kind" ,
+which is either "fast",
+"recursive",
+or "error checking".
The kind of a mutex determines
whether it can be locked again by a thread that already owns it.
-The default kind is ``fast''.
-See \fBpthread_mutexattr_init\fP(3) for more information on mutex attributes.
+The default kind is "fast".
+See
+.BR pthread_mutexattr_init (3)
+for more information on mutex attributes.
.P
-Variables of type \fBpthread_mutex_t\fP can also be initialized statically,
+Variables of type
+.I pthread_mutex_t
+can also be initialized statically,
using the constants
-\fBPTHREAD_MUTEX_INITIALIZER\fP
+.B PTHREAD_MUTEX_INITIALIZER
(for fast mutexes),
-\fBPTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP\fP
+.B PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
(for recursive mutexes),
-and \fBPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP\fP
+and
+.B PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
(for error checking mutexes).
.P
-\fBpthread_mutex_lock\fP locks the given mutex.
+.BR pthread_mutex_lock ()
+locks the given mutex.
If the mutex is currently unlocked,
it becomes locked and owned by the calling thread,
-and \fBpthread_mutex_lock\fP returns immediately.
+and
+.BR pthread_mutex_lock ()
+returns immediately.
If the mutex is already locked by another thread,
-\fBpthread_mutex_lock\fP suspends the calling thread
+.BR pthread_mutex_lock ()
+suspends the calling thread
until the mutex is unlocked.
.P
If the mutex is already locked by the calling thread,
-the behavior of \fBpthread_mutex_lock\fP depends on the kind of the mutex.
-If the mutex is of the ``fast'' kind,
+the behavior of
+.BR pthread_mutex_lock ()
+depends on the kind of the mutex.
+If the mutex is of the "fast" kind,
the calling thread is suspended until the mutex is unlocked,
thus effectively causing the calling thread to deadlock.
-If the mutex is of the ``error checking'' kind,
-\fBpthread_mutex_lock\fP returns immediately with the error code \fBEDEADLK\fP.
-If the mutex is of the ``recursive'' kind,
-\fBpthread_mutex_lock\fP succeeds and returns immediately,
+If the mutex is of the "error checking" kind,
+.BR pthread_mutex_lock ()
+returns immediately with the error code
+.BR EDEADLK .
+If the mutex is of the "recursive" kind,
+.BR pthread_mutex_lock ()
+succeeds and returns immediately,
recording the number of times the calling thread has locked the mutex.
-An equal number of \fBpthread_mutex_unlock\fP operations
+An equal number of
+.BR pthread_mutex_unlock ()
+operations
must be performed before the mutex returns to the unlocked state.
.P
-\fBpthread_mutex_trylock\fP behaves identically to \fBpthread_mutex_lock\fP,
+.BR pthread_mutex_trylock ()
+behaves identically to
+.BR pthread_mutex_lock (),
except that it does not block the calling thread
if the mutex is already locked by another thread
-(or by the calling thread in the case of a ``fast'' mutex).
+(or by the calling thread in the case of a "fast" mutex).
Instead,
-\fBpthread_mutex_trylock\fP returns immediately
-with the error code \fBEBUSY\fP.
+.BR pthread_mutex_trylock ()
+returns immediately
+with the error code
+.BR EBUSY .
.P
-\fBpthread_mutex_unlock\fP unlocks the given mutex.
+.BR pthread_mutex_unlock ()
+unlocks the given mutex.
The mutex is assumed to be locked and owned by the calling thread
-on entrance to \fBpthread_mutex_unlock\fP.
-If the mutex is of the ``fast'' kind,
-\fBpthread_mutex_unlock\fP always returns it to the unlocked state.
-If it is of the ``recursive'' kind,
+on entrance to
+.BR pthread_mutex_unlock ().
+If the mutex is of the "fast" kind,
+.BR pthread_mutex_unlock ()
+always returns it to the unlocked state.
+If it is of the "recursive" kind,
it decrements the locking count of the mutex
-(number of \fBpthread_mutex_lock\fP operations
+(number of
+.BR pthread_mutex_lock ()
+operations
performed on it by the calling thread),
and only when this count reaches zero is the mutex actually unlocked.
.P
-On ``error checking'' and ``recursive'' mutexes,
-\fBpthread_mutex_unlock\fP actually checks at run-time
+On "error checking" and "recursive" mutexes,
+.BR pthread_mutex_unlock ()
+actually checks at run-time
that the mutex is locked on entrance,
and that it was locked by the same thread
-that is now calling \fBpthread_mutex_unlock\fP.
+that is now calling
+.BR pthread_mutex_unlock ().
If these conditions are not met,
an error code is returned and the mutex remains unchanged.
-``Fast'' mutexes perform no such checks,
+"Fast" mutexes perform no such checks,
thus allowing a locked mutex to be
unlocked by a thread other than its owner.
This is non-portable behavior and must not be relied upon.
.P
-\fBpthread_mutex_destroy\fP destroys a mutex object,
+.BR pthread_mutex_destroy ()
+destroys a mutex object,
freeing the resources it might hold.
The mutex must be unlocked on entrance.
In the LinuxThreads implementation,
no resources are associated with mutex objects,
-thus \fBpthread_mutex_destroy\fP actually does nothing
+thus
+.BR pthread_mutex_destroy ()
+actually does nothing
except checking that the mutex is unlocked.
.
.
.SH CANCELLATION
None of the mutex functions is a cancelation point,
-not even \fBpthread_mutex_lock\fP,
+not even
+.BR pthread_mutex_lock (),
in spite of the fact that it can suspend a thread for arbitrary durations.
This way,
the status of mutexes at cancelation points is predictable,
The mutex functions are not async-signal safe.
What this means is that they should not be called from a signal handler.
In particular,
-calling \fBpthread_mutex_lock\fP or \fBpthread_mutex_unlock\fP
+calling
+.BR pthread_mutex_lock ()
+or
+.BR pthread_mutex_unlock ()
from a signal handler
may deadlock the calling thread.
.
.
.SH "RETURN VALUE"
-\fBpthread_mutex_init\fP always returns 0.
+.BR pthread_mutex_init ()
+always returns 0.
The other mutex functions
return 0 on success and a non-zero error code on error.
.
.
.SH ERRORS
-The \fBpthread_mutex_lock\fP function returns
+The
+.BR pthread_mutex_lock ()
+function returns
the following error code on error:
.RS
.TP
-\fBEINVAL\fP
+.B EINVAL
The mutex has not been properly initialized.
.TP
-\fBEDEADLK\fP
+.B EDEADLK
The mutex is already locked by the calling thread
-(``error checking'' mutexes only).
+("error checking" mutexes only).
.RE
.P
-The \fBpthread_mutex_trylock\fP function returns
+The
+.BR pthread_mutex_trylock ()
+function returns
the following error codes on error:
.RS
.TP
-\fBEBUSY\fP
+.B EBUSY
The mutex could not be acquired because it was currently locked.
.TP
-\fBEINVAL\fP
+.B EINVAL
The mutex has not been properly initialized.
.RE
.P
-The \fBpthread_mutex_unlock\fP function returns
+The
+.BR pthread_mutex_unlock ()
+function returns
the following error code on error:
.RS
.TP
-\fBEINVAL\fP
+.B EINVAL
The mutex has not been properly initialized.
.TP
-\fBEPERM\fP
+.B EPERM
The calling thread does not own the mutex
-(``error checking'' mutexes only).
+("error checking" mutexes only).
.RE
.P
-The \fBpthread_mutex_destroy\fP function returns
+The
+.BR pthread_mutex_destroy ()
+function returns
the following error code on error:
.RS
.TP
-\fBEBUSY\fP
+.B EBUSY
The mutex is currently locked.
.RE
.
.
.SH "SEE ALSO"
-\fBpthread_mutexattr_init\fP(3),
-\fBpthread_mutexattr_setkind_np\fP(3),
-\fBpthread_cancel\fP(3).
+.BR pthread_mutexattr_init (3),
+.BR pthread_mutexattr_setkind_np (3),
+.BR pthread_cancel (3).
.
.
.SH EXAMPLE
-A shared global variable \fIx\fP can be protected by a mutex as follows:
+A shared global variable
+.I x
+can be protected by a mutex as follows:
.P
.RS
.ft 3
.RE
.fi
.P
-All accesses and modifications to \fIx\fP
+All accesses and modifications to
+.I x
should be bracketed by calls to
-\fBpthread_mutex_lock\fP and \fBpthread_mutex_unlock\fP
+.BR pthread_mutex_lock ()
+and
+.BR pthread_mutex_unlock ()
as follows:
.P
.RS
.
.SH DESCRIPTION
These functions are deprecated,
-use \fBpthread_mutexattr_settype\fP(3)
-and \fBpthread_mutexattr_gettype\fP(3)
+use
+.BR pthread_mutexattr_settype (3)
+and
+.BR pthread_mutexattr_gettype (3)
instead.
.
.
.SH "RETURN VALUE"
-\fBpthread_mutexattr_getkind_np\fP always returns 0.
+.BR pthread_mutexattr_getkind_np ()
+always returns 0.
.P
-\fBpthread_mutexattr_setkind_np\fP
+.BR pthread_mutexattr_setkind_np ()
returns 0 on success and a non-zero error code on error.
.
.
.SH ERRORS
On error,
-\fBpthread_mutexattr_setkind_np\fP returns the following error code:
+.BR pthread_mutexattr_setkind_np ()
+returns the following error code:
.TP
-\fBEINVAL\fP
-\fIkind\fP is neither
-\fBPTHREAD_MUTEX_FAST_NP\fP
+.B EINVAL
+.I kind
+is neither
+.B PTHREAD_MUTEX_FAST_NP
nor
-\fBPTHREAD_MUTEX_RECURSIVE_NP\fP
+.B PTHREAD_MUTEX_RECURSIVE_NP
nor
-\fBPTHREAD_MUTEX_ERRORCHECK_NP\fP.
+.BR PTHREAD_MUTEX_ERRORCHECK_NP .
.
.
.SH "SEE ALSO"
-\fBpthread_mutexattr_settype\fP(3),
-\fBpthread_mutexattr_gettype\fP(3).
+.BR pthread_mutexattr_settype (3),
+.BR pthread_mutexattr_gettype (3).
.P
.in +4n
.EX
-$ \fB./a.out\fP
+.RB $ " ./a.out" ;
[original owner] Setting lock...
[original owner] Locked. Now exiting without unlocking.
[main] Attempting to lock the robust mutex.
.
.
.SH DESCRIPTION
-The purpose of \fBpthread_once\fP is
+The purpose of
+.BR pthread_once ()
+is
to ensure that a piece of initialization code is executed at most once.
-The \fIonce_control\fP argument points to a static or extern variable
-statically initialized to \fBPTHREAD_ONCE_INIT\fP.
+The
+.I once_control
+argument points to a static or extern variable
+statically initialized to
+.BR PTHREAD_ONCE_INIT .
.P
-The first time \fBpthread_once\fP is called
-with a given \fIonce_control\fP argument,
-it calls \fIinit_routine\fP with no argument
-and changes the value of the \fIonce_control\fP variable
+The first time
+.BR pthread_once ()
+is called
+with a given
+.I once_control
+argument,
+it calls
+.I init_routine
+with no argument
+and changes the value of the
+.I once_control
+variable
to record that initialization has been performed.
-Subsequent calls to \fBpthread_once\fP
-with the same \fBonce_control\fP argument
+Subsequent calls to
+.BR pthread_once ()
+with the same
+.I once_control
+argument
do nothing.
.
.
.SH "RETURN VALUE"
-\fBpthread_once\fP always returns 0.
+.BR pthread_once ()
+always returns 0.
.
.
.SH ERRORS
a structure is permitted.
Therefore, variables of type
.I pthread_t
-can't portably be compared using the C equality operator (\fB==\fP);
+can't portably be compared using the C equality operator
+.RB ( == );
use
.BR pthread_equal (3)
instead.
.P
.in +4n
.EX
-.RB "$" " ./a.out"
+.RB $ " ./a.out" ;
Created a thread. Default name is: a.out
The thread name after setting it is THREADFOO.
-\fB\[ha]Z\fP # Suspend the program
+\f[B]\[ha]Z\f[] # Suspend the program
[1]+ Stopped ./a.out
.RB "$ " "ps H \-C a.out \-o \[aq]pid tid cmd comm\[aq]"
PID TID CMD COMMAND
.P
.in +4n
.EX
-$ \fBsu\fP # Need privilege to set real\-time scheduling policies
+.RB $ " su" "; # Need privilege to set real-time scheduling policies"
Password:
-# \fB./a.out \-mf10 \-ar20 \-i e\fP
+.RB # " ./a.out \-mf10 \-ar20 \-i e" ;
Scheduler settings of main thread
policy=SCHED_FIFO, priority=10
\&
.P
.in +4n
.EX
-# \fB./a.out \-mf10 \-ar20 \-i i\fP
+.RB # " ./a.out \-mf10 \-ar20 \-i i" ;
Scheduler settings of main thread
policy=SCHED_FIFO, priority=10
\&
.BR putenv ()
function adds or changes the value of environment
variables.
-The argument \fIstring\fP is of the form \fIname\fP=\fIvalue\fP.
-If \fIname\fP does not already exist in the environment, then
-\fIstring\fP is added to the environment.
-If \fIname\fP does exist,
-then the value of \fIname\fP in the environment is changed to
-\fIvalue\fP.
-The string pointed to by \fIstring\fP becomes part of the environment,
+The argument
+.I string
+is of the form
+.IR name = value .
+If
+.I name
+does not already exist in the environment, then
+.I string
+is added to the environment.
+If
+.I name
+does exist,
+then the value of
+.I name
+in the environment is changed to
+.IR value .
+The string pointed to by
+.I string
+becomes part of the environment,
so altering the string changes the environment.
.SH RETURN VALUE
The
one in glibc 2.0 is not, but the glibc 2.1 version is.
.\" .P
.\" Description for libc4, libc5, glibc:
-.\" If the argument \fIstring\fP is of the form \fIname\fP,
-.\" and does not contain an \[aq]=\[aq] character, then the variable \fIname\fP
+.\" If the argument
+.\" .I string
+.\" is of the form
+.\" .IR name ,
+.\" and does not contain an \[aq]=\[aq] character, then the variable
+.\" .I name
.\" is removed from the environment.
.\" If
.\" .BR putenv ()
-.\" has to allocate a new array \fIenviron\fP,
+.\" has to allocate a new array
+.\" .IR environ ,
.\" and the previous array was also allocated by
.\" .BR putenv (),
.\" then it will be freed.
.\" to the environment variable itself be freed.
.P
Since glibc 2.1.2, the glibc implementation conforms to SUSv2:
-the pointer \fIstring\fP given to
+the pointer
+.I string
+given to
.BR putenv ()
is used.
In particular, this string becomes part of the environment;
(Thus, it is an error to call
.BR putenv ()
with an automatic variable
-as the argument, then return from the calling function while \fIstring\fP
+as the argument, then return from the calling function while
+.I string
is still part of the environment.)
However, from glibc 2.0 to glibc 2.1.1, it differs:
a copy of the string is used.
The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
this is fixed in all modern BSDs.
.P
-SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
+SUSv2 removes the
+.I const
+from the prototype, and so does glibc 2.1.3.
.P
The GNU C library implementation provides a nonstandard extension.
If
The
.BR putpwent ()
function writes a password entry from the
-structure \fIp\fP in the file associated with \fIstream\fP.
+structure
+.I p
+in the file associated with
+.IR stream .
.P
-The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
+The
+.I passwd
+structure is defined in
+.I <pwd.h>
+as follows:
.P
.in +4n
.EX
.I stream
more than once.
.P
-.BI "putchar(" c )
+.I putchar(c)
is equivalent to
-.BI "putc(" c ", " stdout ) \fR.
+.IR "putc(c,\ stdout)" .
.P
.BR fputs ()
writes the string
.SH DESCRIPTION
The
.BR qsort ()
-function sorts an array with \fIn\fP elements of
-size \fIsize\fP.
-The \fIbase\fP argument points to the start of the
+function sorts an array with
+.I n
+elements of size
+.IR size .
+The
+.I base
+argument points to the start of the
array.
.P
The contents of the array are sorted in ascending order according to a
-comparison function pointed to by \fIcompar\fP, which is called with two
+comparison function pointed to by
+.IR compar ,
+which is called with two
arguments that point to the objects being compared.
.P
The comparison function must return an integer less than, equal to, or
.BR rand ()
function returns a pseudo-random integer in the range 0 to
.B RAND_MAX
-inclusive (i.e., the mathematical range [0,\ \fBRAND_MAX\fR]).
+inclusive (i.e., the mathematical range
+.RB [ 0 ,\~ RAND_MAX ]).
.P
The
.BR srand ()
Like
.BR rand (),
.BR rand_r ()
-returns a pseudo-random integer in the range [0,\ \fBRAND_MAX\fR].
+returns a pseudo-random integer in the range
+.RB [ 0 ,\~ RAND_MAX ].
The
.I seedp
argument is a pointer to an
.P
The
.BR initstate ()
-function allows a state array \fIstate\fP to
+function allows a state array
+.I state
+to
be initialized for use by
.BR random ().
The size of the state array
-\fIn\fP is used by
+.I n
+is used by
.BR initstate ()
to decide how sophisticated a
random number generator it should use\[em]the larger the state array,
the better the random numbers will be.
-Current "optimal" values for the size of the state array \fIn\fP are
+Current "optimal" values for the size of the state array
+.I n
+are
8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to
the nearest known amount.
Using less than 8 bytes results in an error.
-\fIseed\fP is the seed for the
-initialization, which specifies a starting point for the random number
+.I seed
+is the seed for the initialization,
+which specifies a starting point for the random number
sequence, and provides for restarting at the same point.
.P
The
function changes the state array used by the
.BR random ()
function.
-The state array \fIstate\fP is used for
+The state array
+.I state
+is used for
random number generation until the next call to
.BR initstate ()
or
.BR setstate ().
-\fIstate\fP must first have been initialized
+.I state
+must first have been initialized
using
.BR initstate ()
or be the result of a previous call of
except that it modifies the state in the object pointed to by
.IR buf ,
rather than modifying the global state variable.
-\fIstate\fP must first have been initialized
+.I state
+must first have been initialized
using
.BR initstate_r ()
or be the result of a previous call of
.SH DESCRIPTION
The
.BR readdir ()
-function returns a pointer to a \fIdirent\fP structure
+function returns a pointer to a
+.I dirent
+structure
representing the next directory entry in the directory stream pointed
-to by \fIdirp\fP.
+to by
+.IR dirp .
It returns NULL on reaching the end of the directory stream or if
an error occurred.
.P
.SH ERRORS
.TP
.B EBADF
-Invalid directory stream descriptor \fIdirp\fP.
+Invalid directory stream descriptor
+.IR dirp .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.SH ERRORS
.TP
.B EBADF
-Invalid directory stream descriptor \fIdirp\fP.
+Invalid directory stream descriptor
+.IR dirp .
.TP
.B ENAMETOOLONG
A directory entry whose name was too long to be read was encountered.
.P
In 4.4BSD and Solaris, the limit on the pathname length is
.B MAXPATHLEN
-(found in \fI<sys/param.h>\fP).
+(found in
+.IR <sys/param.h> ).
SUSv2 prescribes
.B PATH_MAX
and
.BR NAME_MAX ,
-as found in \fI<limits.h>\fP or provided by the
+as found in
+.I <limits.h>
+or provided by the
.BR pathconf (3)
function.
A typical source fragment would be
.\" argument is relative.
.\" The prototype of
.\" .BR realpath ()
-.\" is given in \fI<unistd.h>\fP in libc4 and libc5,
-.\" but in \fI<stdlib.h>\fP everywhere else.
+.\" is given in \f[I]<unistd.h>\f[] in libc4 and libc5,
+.\" but in \f[I]<stdlib.h>\f[] everywhere else.
.SH BUGS
The POSIX.1-2001 standard version of this function is broken by design,
since it is impossible to determine a suitable size for the output buffer,
by
.IR y .
The return value is
-\fIx\fP\-\fIn\fP*\fIy\fP,
+.IR x\-n*y ,
where
.I n
is the value
.IR "x\ /\ y" ,
rounded to the nearest integer.
If the absolute value of
-\fIx\fP\-\fIn\fP*\fIy\fP
+.I x\-n*y
is 0.5,
.I n
is chosen to be even.
.SH RETURN VALUE
On success, these
functions return the floating-point remainder,
-\fIx\fP\-\fIn\fP*\fIy\fP.
+.IR x\-n*y .
If the return value is 0, it has the sign of
.IR x .
.P
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity and \fIy\fP is not a NaN
+Domain error: \f[I]x\f[] is an infinity and \f[I]y\f[] is not a NaN
.I errno
is set to
.B EDOM
.I errno
for this case.
.TP
-Domain error: \fIy\fP is zero\" [XXX see bug above] and \fIx\fP is not a NaN
+Domain error: \f[I]y\f[] is zero
+.\" [XXX see bug above] and \f[I]x\f[] is not a NaN
.I errno
is set to
.BR EDOM .
.I x\~/\~y
and agrees with the quotient in at least the low order 3 bits.
.P
-For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2.
+For example,
+.I remquo(29.0,\ 3.0)
+returns \-1.0 and might store 2.
Note that the actual quotient might not fit in an integer.
.\" A possible application of this function might be the computation
.\" of sin(x). Compute remquo(x, pi/2, &quo) or so.
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \
+Domain error: \f[I]x\f[] is an infinity or \f[I]y\f[] is 0, \
and the other argument is not a NaN.
.\" .I errno
.\" is set to
and
.BR res_query ()
functions query the name server for the
-fully qualified domain name \fIname\fP of specified \fItype\fP and
-\fIclass\fP.
-The reply is left in the buffer \fIanswer\fP of length
-\fIanslen\fP supplied by the caller.
+fully qualified domain name
+.I name
+of specified
+.I type
+and
+.IR class .
+The reply is left in the buffer
+.I answer
+of length
+.I anslen
+supplied by the caller.
.P
The
.BR res_nsearch ()
and
.B RES_DNSRCH
(see description of
-\fI_res\fP options below).
+.I _res
+options below).
.P
The
.BR res_nquerydomain ()
.BR res_querydomain ()
functions make a query using
.BR res_nquery ()/ res_query ()
-on the concatenation of \fIname\fP and \fIdomain\fP.
+on the concatenation of
+.I name
+and
+.IR domain .
.P
The following functions are lower-level routines used by
.BR res_nquery ()/ res_query ().
.BR res_nmkquery ()
and
.BR res_mkquery ()
-functions construct a query message in \fIbuf\fP
-of length \fIbuflen\fP for the domain name \fIdname\fP.
+functions construct a query message in
+.I buf
+of length
+.I buflen
+for the domain name
+.IR dname .
The query type
-\fIop\fP is one of the following (typically
+.I op
+is one of the following (typically
.BR QUERY ):
.TP
.B QUERY
.B NS_NOTIFY_OP
Notify secondary of SOA (Start of Authority) change.
.P
-\fInewrr\fP is currently unused.
+.I newrr
+is currently unused.
.P
The
.BR res_nsend ()
and
.BR res_send ()
function send a preformatted query given in
-\fImsg\fP of length \fImsglen\fP and returns the answer in \fIanswer\fP
-which is of length \fIanslen\fP.
+.I msg
+of length
+.I msglen
+and returns the answer in
+.I answer
+which is of length
+.IR anslen .
They will call
.BR res_ninit ()/ res_init ()
if it has not already been called.
.P
The
.BR dn_comp ()
-function compresses the domain name \fIexp_dn\fP
-and stores it in the buffer \fIcomp_dn\fP of length \fIlength\fP.
-The compression uses an array of pointers \fIdnptrs\fP to previously
-compressed names in the current message.
+function compresses the domain name
+.I exp_dn
+and stores it in the buffer
+.I comp_dn
+of length
+.IR length .
+The compression uses an array of pointers
+.I dnptrs
+to previously compressed names in the current message.
The first pointer points
to the beginning of the message and the list ends with NULL.
-The limit of the array is specified by \fIlastdnptr\fP.
-If \fIdnptr\fP is NULL, domain names are not compressed.
-If \fIlastdnptr\fP is NULL, the list
-of labels is not updated.
+The limit of the array is specified by
+.IR lastdnptr .
+If
+.I dnptr
+is NULL,
+domain names are not compressed.
+If
+.I lastdnptr
+is NULL,
+the list of labels is not updated.
.P
The
.BR dn_expand ()
function expands the compressed domain name
-\fIcomp_dn\fP to a full domain name, which is placed in the buffer
-\fIexp_dn\fP of size \fIlength\fP.
+.I comp_dn
+to a full domain name,
+which is placed in the buffer
+.I exp_dn
+of size
+.IR length .
The compressed name is contained
-in a query or reply message, and \fImsg\fP points to the beginning of
-the message.
+in a query or reply message,
+and
+.I msg
+points to the beginning of the message.
.P
The resolver routines use configuration and state information
contained in a
.IP
.in +4n
.EX
-\fBCLSET_TIMEOUT\fP \fIstruct timeval\fP // set total timeout
-\fBCLGET_TIMEOUT\fP \fIstruct timeval\fP // get total timeout
+\f[B]CLSET_TIMEOUT\f[] \f[I]struct timeval\f[] // set total timeout
+\f[B]CLGET_TIMEOUT\f[] \f[I]struct timeval\f[] // get total timeout
.EE
.in
.IP
.IP
.in +4n
.EX
-\fBCLGET_SERVER_ADDR\fP \fIstruct sockaddr_in\fP
+\f[B]CLGET_SERVER_ADDR\f[] \f[I]struct sockaddr_in\f[]
// get server\[aq]s address
.EE
.in
.IP
.in +4n
.EX
-\fBCLSET_RETRY_TIMEOUT\fP \fIstruct timeval\fP // set the retry timeout
-\fBCLGET_RETRY_TIMEOUT\fP \fIstruct timeval\fP // get the retry timeout
+\f[B]CLSET_RETRY_TIMEOUT\f[] \f[I]struct timeval\f[] // set the retry timeout
+\f[B]CLGET_RETRY_TIMEOUT\f[] \f[I]struct timeval\f[] // get the retry timeout
.EE
.in
.IP
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \
-or \fIx\fP is positive infinity and \fIexp\fP is negative infinity \
+Domain error: \f[I]x\f[] is 0, and \f[I]exp\f[] is positive infinity, \
+or \f[I]x\f[] is positive infinity and \f[I]exp\f[] is negative infinity \
and the other argument is not a NaN
.I errno
is set to
.SH DESCRIPTION
The
.BR scandir ()
-function scans the directory \fIdirp\fP, calling
-\fIfilter\fP() on each directory entry.
+function scans the directory
+.IR dirp ,
+calling
+.IR filter ()
+on each directory entry.
Entries for which
-\fIfilter\fP() returns nonzero are stored in strings allocated via
+.IR filter ()
+returns nonzero are stored in strings allocated via
.BR malloc (3),
sorted using
.BR qsort (3)
with the comparison
-function \fIcompar\fP(), and collected in array \fInamelist\fP
+function
+.IR compar (),
+and collected in array
+.I namelist
which is allocated via
.BR malloc (3).
-If \fIfilter\fP is NULL, all entries are selected.
+If
+.I filter
+is NULL, all entries are selected.
.P
The
.BR alphasort ()
.BR strcoll (3),
the latter using
.BR strverscmp (3)
-on the strings \fI(*a)\->d_name\fP and \fI(*b)\->d_name\fP.
+on the strings
+.I (*a)\->d_name
+and
+.IR (*b)\->d_name .
.SS scandirat()
The
.BR scandirat ()
nor a valid file descriptor.
.TP
.B ENOENT
-The path in \fIdirp\fR does not exist.
+The path in
+.I dirp
+does not exist.
.TP
.B ENOMEM
Insufficient memory to complete the operation.
.TP
.B ENOTDIR
-The path in \fIdirp\fR is not a directory.
+The path in
+.I dirp
+is not a directory.
.TP
.B ENOTDIR
.RB ( scandirat ())
.B #include <semaphore.h>
.P
.BI "sem_t *sem_open(const char *" name ", int " oflag ", ..."
-.BI " \fR/*\fP mode_t " mode ", unsigned int " value " \fR*/\fP );"
+.BI " \f[R]/*\f[] mode_t " mode \
+", unsigned int " value " \f[R]*/\f[] );"
.fi
.SH DESCRIPTION
.BR sem_open ()
the destination file or terminal as soon as written; when it is block
buffered, many characters are saved up and written as a block; when it is
line buffered, characters are saved up until a newline is output or input is
-read from any stream attached to a terminal device (typically \fIstdin\fP).
+read from any stream attached to a terminal device (typically
+.IR stdin ).
The function
.BR fflush (3)
may be used to force the block out early.
.P
.in +4n
.EX
-$ \fB./pshm_ucase_bounce /myshm &\fP
+.RB $ " ./pshm_ucase_bounce /myshm &"
[1] 270171
-$ \fB./pshm_ucase_send /myshm hello\fP
+.RB $ " ./pshm_ucase_send /myshm hello" ;
HELLO
.EE
.in
The
.BR siginterrupt ()
function changes the restart behavior when
-a system call is interrupted by the signal \fIsig\fP.
-If the \fIflag\fP
+a system call is interrupted by the signal
+.IR sig .
+If the
+.I flag
argument is false (0), then system calls will be restarted if interrupted
-by the specified signal \fIsig\fP.
+by the specified signal
+.IR sig .
This is the default behavior in Linux.
.P
-If the \fIflag\fP argument is true (1) and no data has been transferred,
-then a system call interrupted by the signal \fIsig\fP will return \-1
-and \fIerrno\fP will be set to
+If the
+.I flag
+argument is true (1) and no data has been transferred,
+then a system call interrupted by the signal
+.I sig
+will return \-1
+and
+.I errno
+will be set to
.BR EINTR .
.P
-If the \fIflag\fP argument is true (1) and data transfer has started,
+If the
+.I flag
+argument is true (1) and data transfer has started,
then the system call will be interrupted and will return the actual
amount of data transferred.
.SH RETURN VALUE
.SS GNU
If the
.B _GNU_SOURCE
-feature test macro is defined, then \fI<signal.h>\fP
+feature test macro is defined, then
+.I <signal.h>
exposes three other functions for manipulating signal
sets:
.P
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity
+Domain error: \f[I]x\f[] is an infinity
.I errno
is set to
.B EDOM
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity
+Domain error: \f[I]x\f[] is an infinity
.I errno
is set to
.B EDOM
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP less than \-0
+Domain error: \f[I]x\f[] less than \-0
.I errno
is set to
.BR EDOM .
in
.I format
begins with either the character \[aq]%\[aq] or the character sequence
-"\fB%\fP\fIn\fP\fB$\fP"
+.RB \[dq] % \f[I]n\f[] $ \[dq]
(see below for the distinction) followed by:
.TP
\[bu]
The conversion specifications in
.I format
are of two forms, either beginning with \[aq]%\[aq] or beginning with
-"\fB%\fP\fIn\fP\fB$\fP".
+.RB \[dq] % \f[I]n\f[] $ \[dq].
The two forms should not be mixed in the same
.I format
string, except that a string containing
-"\fB%\fP\fIn\fP\fB$\fP"
+.RB \[dq] % \f[I]n\f[] $ \[dq]
specifications can include
.B %%
and
.I pointer
arguments.
In the
-"\fB%\fP\fIn\fP\fB$\fP"
+.RB \[dq] % \f[I]n\f[] $ \[dq]
form (which is specified in POSIX.1-2001, but not C99),
.I n
is a decimal integer that specifies that the converted input should
.TP
.B h
Indicates that the conversion will be one of
-\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, or \fBn\fP
+.BR d ,
+.BR i ,
+.BR o ,
+.BR u ,
+.BR x ,
+.BR X ,
+or
+.BR n ,
and the next pointer is a pointer to a
.I short
or
.TP
.B l
Indicates either that the conversion will be one of
-\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, or \fBn\fP
+.BR d ,
+.BR i ,
+.BR o ,
+.BR u ,
+.BR x ,
+.BR X ,
+or
+.BR n ,
and the next pointer is a pointer to a
.I long
or
(rather than
.IR int ),
or that the conversion will be one of
-\fBe\fP, \fBf\fP, or \fBg\fP
+.BR e ,
+.BR f ,
+or
+.BR g ,
and the next pointer is a pointer to
.I double
(rather than
.BR x ,
.BR X ,
or
-.B n
+.BR n ,
and the next pointer is a pointer to a
.I long long
or
.TP
.B L
Indicates that the conversion will be either
-\fBe\fP, \fBf\fP, or \fBg\fP
+.BR e ,
+.BR f ,
+or
+.BR g ,
and the next pointer is a pointer to
.I "long double"
or
(as a GNU extension)
the conversion will be
-\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, or \fBx\fP
+.BR d ,
+.BR i ,
+.BR o ,
+.BR u ,
+or
+.BR x ,
and the next pointer is a pointer to
.IR "long long" .
.\" MTK, Jul 05: The following is no longer true for modern
instead of
.B L
in combination with
-\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, and \fBX\fP
+.BR d ,
+.BR i ,
+.BR o ,
+.BR u ,
+.BR x ,
+and
+.B X
conversions or
.BR ll .
.P
as a length modifier (thus
.B %ms
or
-\fB%m[\fP\fIrange\fP\fB]\fP).
+.BR %m[ \f[I]range\f[] ] ).
The caller must
.BR free (3)
the returned string, as in the following example:
.P
.in +4n
.EX
-$ \fB./string_comp ABC ABC\fP
+.RB $ " ./string_comp ABC ABC" ;
<str1> and <str2> are equal
-$ \fB./string_comp ABC AB\fP # \[aq]C\[aq] is ASCII 67; \[aq]C\[aq] \- \[aq]\[rs]0\[aq] = 67
+.RB $ " ./string_comp ABC AB" "; # \[aq]C\[aq] is ASCII 67; \[aq]C\[aq] \- \[aq]\[rs]0\[aq] = 67"
<str1> is greater than <str2> (67)
-$ \fB./string_comp ABA ABZ\fP # \[aq]A\[aq] is ASCII 65; \[aq]Z\[aq] is ASCII 90
+.RB $ " ./string_comp ABA ABZ" "; # \[aq]A\[aq] is ASCII 65; \[aq]Z\[aq] is ASCII 90"
<str1> is less than <str2> (\-25)
-$ \fB./string_comp ABJ ABC\fP
+.RB $ " ./string_comp ABJ ABC" ;
<str1> is greater than <str2> (7)
-$ .\fB/string_comp $\[aq]\[rs]201\[aq] A\fP # 0201 \- 0101 = 0100 (or 64 decimal)
+.RB $ " ./string_comp $\[aq]\[rs]201\[aq] A" "; # 0201 \- 0101 = 0100 (or 64 decimal)"
<str1> is greater than <str2> (64)
.EE
.in
.P
.in +4n
.EX
-$ \fB./string_comp ABC AB 3\fP
+.RB $ " ./string_comp ABC AB 3" ;
<str1> is greater than <str2> (67)
-$ \fB./string_comp ABC AB 2\fP
+.RB $ " ./string_comp ABC AB 2" ;
<str1> and <str2> are equal in the first 2 bytes
.EE
.in
Put another way: the tokens returned by
.BR strtok ()
are always nonempty strings.
-Thus, for example, given the string "\fIaaa;;bbb,\fP",
+Thus, for example, given the string
+.RI \[dq] aaa;;bbb, \[dq],
successive calls to
.BR strtok ()
-that specify the delimiter string "\fI;,\fP"
-would return the strings "\fIaaa\fP" and "\fIbbb\fP",
+that specify the delimiter string
+.RI \[dq] ;, \[dq]
+would return the strings
+.RI \[dq] aaa \[dq]
+and
+.RI \[dq] bbb \[dq],
and then a null pointer.
.P
The
.P
.in +4n
.EX
-$ \fB./a.out jan1 jan10\fP
+.RB $ " ./a.out jan1 jan10" ;
jan1 < jan10
.EE
.in
.BR closelog ()
is optional.
.\"
-.SS Values for \fIoption\fP
+.SS Values for \f[I]option\f[]
The
.I option
argument to
.B LOG_PID
Include the caller's PID with each message.
.\"
-.SS Values for \fIfacility\fP
+.SS Values for \f[I]facility\f[]
The
.I facility
argument is used to specify what type of program is logging the message.
.B LOG_UUCP
UUCP subsystem
.\"
-.SS Values for \fIlevel\fP
+.SS Values for \f[I]level\f[]
This determines the importance of the message.
The levels are, in order of decreasing importance:
.TP 15
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is an infinity
+Domain error: \f[I]x\f[] is an infinity
.I errno
is set to
.B EDOM
The
.BR telldir ()
function returns the current location associated with
-the directory stream \fIdirp\fP.
+the directory stream
+.IR dirp .
.SH RETURN VALUE
On success, the
.BR telldir ()
.SH ERRORS
.TP
.B EBADF
-Invalid directory stream descriptor \fIdirp\fP.
+Invalid directory stream descriptor
+.IR dirp .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.P
Attempts to find an appropriate directory go through the following
steps:
-.TP 3
-a)
+.IP (1) 5
In case the environment variable
.B TMPDIR
exists and
contains the name of an appropriate directory, that is used.
-.TP
-b)
+.IP (2)
Otherwise, if the
.I dir
argument is non-NULL and appropriate, it is used.
-.TP
-c)
+.IP (3)
Otherwise,
.I P_tmpdir
(as defined in
.IR <stdio.h> )
is used when appropriate.
-.TP
-d)
+.IP (4)
Finally an implementation-defined directory may be used.
.P
The string returned by
.BR TMPDIR ;
glibc will use it only
when the program is not set-user-ID.
-On SVr4, the directory used under \fBd)\fP is
+On SVr4, the directory used under
+.B (4)
+is
.I /tmp
(and this is what glibc does).
.P
The termios functions describe a general terminal interface that is
provided to control asynchronous communications ports.
.SS The termios structure
-Many of the functions described here have a \fItermios_p\fP argument
-that is a pointer to a \fItermios\fP structure.
+Many of the functions described here have a
+.I termios_p
+argument
+that is a pointer to a
+.I termios
+structure.
This structure contains at least the following members:
.P
.in +4n
and "XSI" means that the value is specified in POSIX.1-2001
as part of the XSI extension.
.P
-\fIc_iflag\fP flag constants:
+.I c_iflag
+flag constants:
.TP
.B IGNBRK
Ignore BREAK condition on input.
.TP
.B BRKINT
-If \fBIGNBRK\fP is set, a BREAK is ignored.
+If
+.B IGNBRK
+is set, a BREAK is ignored.
If it is not set
-but \fBBRKINT\fP is set, then a BREAK causes the input and output
+but
+.B BRKINT
+is set, then a BREAK causes the input and output
queues to be flushed, and if the terminal is the controlling
terminal of a foreground process group, it will cause a
-\fBSIGINT\fP to be sent to this foreground process group.
-When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK
-reads as a null byte (\[aq]\[rs]0\[aq]), except when \fBPARMRK\fP is set,
+.B SIGINT
+to be sent to this foreground process group.
+When neither
+.B IGNBRK
+nor
+.B BRKINT
+are set, a BREAK
+reads as a null byte
+.RB ( \[aq]\[rs]0\[aq] ),
+except when
+.B PARMRK
+is set,
in which case it reads as the sequence \[rs]377 \[rs]0 \[rs]0.
.TP
.B IGNPAR
If this bit is set, input bytes with parity or framing errors are
marked when passed to the program.
This bit is meaningful only when
-\fBINPCK\fP is set and \fBIGNPAR\fP is not set.
+.B INPCK
+is set and
+.B IGNPAR
+is not set.
The way erroneous bytes are marked is with two preceding bytes,
\[rs]377 and \[rs]0.
Thus, the program actually reads three bytes for one
erroneous byte received from the terminal.
If a valid byte has the value \[rs]377,
-and \fBISTRIP\fP (see below) is not set,
+and
+.B ISTRIP
+(see below) is not set,
the program might confuse it with the prefix that marks a
parity error.
Therefore, a valid byte \[rs]377 is passed to the program as two
bytes, \[rs]377 \[rs]377, in this case.
.IP
-If neither \fBIGNPAR\fP nor \fBPARMRK\fP
+If neither
+.B IGNPAR
+nor
+.B PARMRK
is set, read a character with a parity error or framing error
as \[rs]0.
.TP
Ignore carriage return on input.
.TP
.B ICRNL
-Translate carriage return to newline on input (unless \fBIGNCR\fP is set).
+Translate carriage return to newline on input (unless
+.B IGNCR
+is set).
.TP
.B IUCLC
(not in POSIX) Map uppercase characters to lowercase on input.
.TP
.B NLDLY
Newline delay mask.
-Values are \fBNL0\fP and \fBNL1\fP.
+Values are
+.B NL0
+and
+.BR NL1 .
[requires
.B _BSD_SOURCE
or
.TP
.B CRDLY
Carriage return delay mask.
-Values are \fBCR0\fP, \fBCR1\fP, \fBCR2\fP, or \fBCR3\fP.
+Values are
+.BR CR0 ,
+.BR CR1 ,
+.BR CR2 ,
+or
+.BR CR3 .
[requires
.B _BSD_SOURCE
or
.TP
.B TABDLY
Horizontal tab delay mask.
-Values are \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (or \fBXTABS\fP,
+Values are
+.BR TAB0 ,
+.BR TAB1 ,
+.BR TAB2 ,
+.B TAB3
+(or
+.BR XTABS ,
but see the
.B BUGS
section).
.TP
.B BSDLY
Backspace delay mask.
-Values are \fBBS0\fP or \fBBS1\fP.
+Values are
+.B BS0
+or
+.BR BS1 .
(Has never been implemented.)
[requires
.B _BSD_SOURCE
.TP
.B VTDLY
Vertical tab delay mask.
-Values are \fBVT0\fP or \fBVT1\fP.
+Values are
+.B VT0
+or
+.BR VT1 .
.TP
.B FFDLY
Form feed delay mask.
-Values are \fBFF0\fP or \fBFF1\fP.
+Values are
+.B FF0
+or
+.BR FF1 .
[requires
.B _BSD_SOURCE
or
or
.BR _XOPEN_SOURCE ]
.P
-\fIc_cflag\fP flag constants:
+.I c_cflag
+flag constants:
.TP
.B CBAUD
(not in POSIX) Baud speed mask (4+1 bits).
.TP
.B CSIZE
Character size mask.
-Values are \fBCS5\fP, \fBCS6\fP, \fBCS7\fP, or \fBCS8\fP.
+Values are
+.BR CS5 ,
+.BR CS6 ,
+.BR CS7 ,
+or
+.BR CS8 .
.TP
.B CSTOPB
Set two stop bits, rather than one.
.TP
.B LOBLK
(not in POSIX) Block output from a noncurrent shell layer.
-For use by \fBshl\fP (shell layers).
+For use by
+.B shl
+(shell layers).
(Not implemented on Linux.)
.TP
.B CIBAUD
or
.BR _SVID_SOURCE ]
.P
-\fIc_lflag\fP flag constants:
+.I c_lflag
+flag constants:
.TP
.B ISIG
When any of the characters INTR, QUIT, SUSP, or DSUSP are received,
.TP
.B XCASE
(not in POSIX; not supported under Linux)
-If \fBICANON\fP is also set, terminal is uppercase only.
+If
+.B ICANON
+is also set, terminal is uppercase only.
Input is converted to lowercase, except for characters preceded by \[rs].
On output, uppercase characters are preceded by \[rs] and lowercase
characters are converted to uppercase.
Echo input characters.
.TP
.B ECHOE
-If \fBICANON\fP is also set, the ERASE character erases the preceding
+If
+.B ICANON
+is also set, the ERASE character erases the preceding
input character, and WERASE erases the preceding word.
.TP
.B ECHOK
-If \fBICANON\fP is also set, the KILL character erases the current line.
+If
+.B ICANON
+is also set, the KILL character erases the current line.
.TP
.B ECHONL
-If \fBICANON\fP is also set, echo the NL character even if ECHO is not set.
+If
+.B ICANON
+is also set, echo the NL character even if ECHO is not set.
.TP
.B ECHOCTL
-(not in POSIX) If \fBECHO\fP is also set,
+(not in POSIX)
+If
+.B ECHO
+is also set,
terminal special characters other than
-TAB, NL, START, and STOP are echoed as \fB\[ha]X\fP,
+TAB, NL, START, and STOP are echoed as
+.BR \[ha]X ,
where X is the character with
ASCII code 0x40 greater than the special character.
For example, character
-0x08 (BS) is echoed as \fB\[ha]H\fP.
+0x08 (BS) is echoed as
+.BR \[ha]H .
[requires
.B _BSD_SOURCE
or
.BR _SVID_SOURCE ]
.TP
.B ECHOPRT
-(not in POSIX) If \fBICANON\fP and \fBECHO\fP are also set, characters
-are printed as they are being erased.
+(not in POSIX) If
+.B ICANON
+and
+.B ECHO
+are also set,
+characters are printed as they are being erased.
[requires
.B _BSD_SOURCE
or
.BR _SVID_SOURCE ]
.TP
.B ECHOKE
-(not in POSIX) If \fBICANON\fP is also set, KILL is echoed by erasing
-each character on the line, as specified by \fBECHOE\fP and \fBECHOPRT\fP.
+(not in POSIX) If
+.B ICANON
+is also set,
+KILL is echoed by erasing
+each character on the line,
+as specified by
+.B ECHOE
+and
+.BR ECHOPRT .
[requires
.B _BSD_SOURCE
or
.TP
.B IEXTEN
Enable implementation-defined input processing.
-This flag, as well as \fBICANON\fP must be enabled for the
+This flag, as well as
+.B ICANON
+must be enabled for the
special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted,
-and for the \fBIUCLC\fP flag to be effective.
+and for the
+.B IUCLC
+flag to be effective.
.P
-The \fIc_cc\fP array defines the terminal special characters.
+The
+.I c_cc
+array defines the terminal special characters.
The symbolic indices (initial values) and meaning are:
.TP
.B VDISCARD
noncanonical mode below.
.SS Retrieving and changing terminal settings
.BR tcgetattr ()
-gets the parameters associated with the object referred by \fIfd\fP and
-stores them in the \fItermios\fP structure referenced by
-\fItermios_p\fP.
+gets the parameters associated with the object referred by
+.I fd
+and
+stores them in the
+.I termios
+structure referenced by
+.IR termios_p .
This function may be invoked from a background process;
however, the terminal attributes may be subsequently changed by a
foreground process.
.BR tcsetattr ()
sets the parameters associated with the terminal (unless support is
required from the underlying hardware that is not available) from the
-\fItermios\fP structure referred to by \fItermios_p\fP.
-\fIoptional_actions\fP specifies when the changes take effect:
+.I termios
+structure referred to by
+.IR termios_p .
+.I optional_actions
+specifies when the changes take effect:
.TP
.B TCSANOW
the change occurs immediately.
transmits a continuous stream of zero-valued bits for a specific
duration, if the terminal is using asynchronous serial data
transmission.
-If \fIduration\fP is zero, it transmits zero-valued bits
+If
+.I duration
+is zero,
+it transmits zero-valued bits
for at least 0.25 seconds, and not more than 0.5 seconds.
-If \fIduration\fP is not zero, it sends zero-valued bits for some
+If
+.I duration
+is not zero,
+it sends zero-valued bits for some
implementation-defined length of time.
.P
If the terminal is not using asynchronous serial data transmission,
output is suspended.
.SS Line speed
The baud rate functions are provided for getting and setting the values
-of the input and output baud rates in the \fItermios\fP structure.
+of the input and output baud rates in the
+.I termios
+structure.
The new values do not take effect
until
.BR tcsetattr ()
is successfully called.
.P
-Setting the speed to \fBB0\fP instructs the modem to "hang up".
-The actual bit rate corresponding to \fBB38400\fP may be altered with
+Setting the speed to
+.B B0
+instructs the modem to "hang up".
+The actual bit rate corresponding to
+.B B38400
+may be altered with
.BR setserial (8).
.P
-The input and output baud rates are stored in the \fItermios\fP
+The input and output baud rates are stored in the
+.I termios
structure.
.P
.BR cfgetospeed ()
-returns the output baud rate stored in the \fItermios\fP structure
+returns the output baud rate stored in the
+.I termios
+structure
pointed to by
.IR termios_p .
.P
.BR cfsetospeed ()
-sets the output baud rate stored in the \fItermios\fP structure pointed
-to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
+sets the output baud rate stored in the
+.I termios
+structure
+pointed to by
+.I termios_p
+to
+.IR speed ,
+which must be one of these constants:
.RS
.TP
.B B0
.SH RETURN VALUE
.BR cfgetispeed ()
returns the input baud rate stored in the
-\fItermios\fP
+.I termios
structure.
.P
.BR cfgetospeed ()
-returns the output baud rate stored in the \fItermios\fP structure.
+returns the output baud rate stored in the
+.I termios
+structure.
.P
All other functions return:
.TP
.P
Note that
.BR tcsetattr ()
-returns success if \fIany\fP of the requested changes could be
+returns success if
+.I any
+of the requested changes could be
successfully carried out.
Therefore, when making multiple changes
it may be necessary to follow this call with a further call to
("External A" and "External B").
Many systems extend the list with much higher baud rates.
.P
-The effect of a nonzero \fIduration\fP with
+The effect of a nonzero
+.I duration
+with
.BR tcsendbreak ()
varies.
SunOS specifies a break of
.I "duration\ *\ N"
-seconds, where \fIN\fP is at least 0.25, and not more than 0.5.
+seconds, where
+.I N
+is at least 0.25, and not more than 0.5.
Linux, AIX, DU, Tru64 send a break of
.I duration
milliseconds.
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is a negative integer, or negative infinity
+Domain error: \f[I]x\f[] is a negative integer, or negative infinity
.I errno
is set to
.BR EDOM .
.RB ( FE_INVALID )
is raised (but see BUGS).
.TP
-Pole error: \fIx\fP is +0 or \-0
+Pole error: \f[I]x\f[] is +0 or \-0
.I errno
is set to
.BR ERANGE .
The function
.BR ttyname ()
returns a pointer to the null-terminated pathname of the terminal device
-that is open on the file descriptor \fIfd\fP, or NULL on error
-(for example, if \fIfd\fP is not connected to a terminal).
+that is open on the file descriptor
+.IR fd ,
+or NULL on error
+(for example,
+if
+.I fd
+is not connected to a terminal).
The return value may point to static data, possibly overwritten by the
next call.
The function
.SH DESCRIPTION
The
.BR tzset ()
-function initializes the \fItzname\fP variable from the
+function initializes the
+.I tzname
+variable from the
.B TZ
environment variable.
This function is automatically called by the
other time conversion functions that depend on the timezone.
-In a System-V-like environment, it will also set the variables \fItimezone\fP
-(seconds West of UTC) and \fIdaylight\fP (to 0 if this timezone does not
+In a System-V-like environment, it will also set the variables
+.I timezone
+(seconds West of UTC)
+and
+.I daylight
+(to 0 if this timezone does not
have any daylight saving time rules, or to nonzero if there is a time,
past, present, or future when daylight saving time applies).
.P
format to
.IR /etc/localtime .
A timezone database of these files may be located in the system
-timezone directory (see the \fBFILES\fP section below).
+timezone directory (see the
+.B FILES
+section below).
.P
If the
.B TZ
.in
.P
There are no spaces in the specification.
-The \fIstd\fP string specifies an abbreviation for the timezone and must be
+The
+.I std
+string specifies an abbreviation for the timezone
+and must be
three or more alphabetic characters.
When enclosed between the less-than (<) and greater-than (>) signs, the
character set is expanded to include the plus (+) sign, the minus (\-)
sign, and digits.
-The \fIoffset\fP string immediately
-follows \fIstd\fP and specifies the time value to be added to the local
-time to get Coordinated Universal Time (UTC).
-The \fIoffset\fP is positive
-if the local timezone is west of the Prime Meridian and negative if it is
-east.
+The
+.I offset
+string
+immediately follows
+.I std
+and specifies the time value to be added to the local time
+to get Coordinated Universal Time (UTC).
+The
+.I offset
+is positive
+if the local timezone is west of the Prime Meridian
+and negative
+if it is east.
The hour must be between 0 and 24, and the minutes and seconds 00 and 59:
.P
.in +4n
.EE
.in
.P
-The \fIdst\fP string and \fIoffset\fP specify the name and offset for the
+The
+.I dst
+string and
+.I offset
+specify the name and offset for the
corresponding daylight saving timezone.
If the offset is omitted,
it defaults to one hour ahead of standard time.
.P
-The \fIstart\fP field specifies when daylight saving time goes into
-effect and the \fIend\fP field specifies when the change is made back to
+The
+.I start
+field specifies when daylight saving time goes into effect
+and the
+.I end
+field specifies when the change is made back to
standard time.
These fields may have the following formats:
.TP
-J\fIn\fP
-This specifies the Julian day with \fIn\fP between 1 and 365.
+.RI J n
+This specifies the Julian day with
+.I n
+between 1 and 365.
Leap days are not counted.
In this format, February 29 can't be represented;
February 28 is day 59, and March 1 is always day 60.
.TP
.I n
-This specifies the zero-based Julian day with \fIn\fP between 0 and 365.
+This specifies the zero-based Julian day with
+.I n
+between 0 and 365.
February 29 is counted in leap years.
.TP
-M\fIm\fP.\fIw\fP.\fId\fP
-This specifies day \fId\fP (0 <= \fId\fP <= 6) of week \fIw\fP
-(1 <= \fIw\fP <= 5) of month \fIm\fP (1 <= \fIm\fP <= 12).
+.RI M m . w . d
+This specifies day
+.I d
+.RI (0\~<=\~ d \~<=\~6)
+of week
+.I w
+.RI (1\~<=\~ w \~<=\~5)
+of month
+.I m
+.RI (1\~<=\~ m \~<=\~12).
Week 1 is
-the first week in which day \fId\fP occurs and week 5 is the last week
-in which day \fId\fP occurs.
+the first week in which day
+.I d
+occurs and week 5 is the last week
+in which day
+.I d
+occurs.
Day 0 is a Sunday.
.P
-The \fItime\fP fields specify when, in the local time currently in effect,
+The
+.I time
+fields specify when,
+in the local time currently in effect,
the change to the other time occurs.
They use the same format as
.I offset
specifies a
.BR tzfile (5)-format
file to read the timezone information from.
-If \fIfilespec\fP does not begin with a \[aq]/\[aq], the file specification is
+If
+.I filespec
+does not begin with a
+.RB \[aq] / \[aq],
+the file specification is
relative to the system timezone directory.
If the specified file cannot be read or interpreted,
Coordinated Universal Time (UTC) is used;
.BR signal (7).
.TP
.B EINVAL
-\fIusecs\fP or \fIinterval\fP is not smaller than 1000000.
+.I usecs
+or
+.I interval
+is not smaller than
+.BR 1000000 .
(On systems where that is considered an error.)
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.I newloc
argument can have one of the following values:
.TP
-A handle returned by a call to \fBnewlocale\fP(3) or \fBduplocale\fP(3)
+A handle returned by a call to
+.BR newlocale (3)
+or
+.BR duplocale (3)
The calling thread's current locale is set to the specified locale.
.TP
-The special locale object handle \fBLC_GLOBAL_LOCALE\fP
+The special locale object handle
+.B LC_GLOBAL_LOCALE
The calling thread's current locale is set to the global locale determined by
.BR setlocale (3).
.TP
The
.BR usleep ()
function suspends execution of the calling thread for
-(at least) \fIusec\fP microseconds.
+(at least)
+.I usec
+microseconds.
The sleep may be lengthened slightly
by any system activity or by the time spent processing the call or by the
granularity of system timers.
.BR signal (7).
.TP
.B EINVAL
-\fIusec\fP is greater than or equal to 1000000.
+.I usec
+is greater than or equal to
+.BR 1000000 .
(On systems where that is considered an error.)
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
wide characters are
written at
.IR dest .
-If the length \fIwcslen(src)\fP is smaller than
+If the length
+.I wcslen(src)
+is smaller than
.IR n ,
the remaining wide characters in the array
pointed to by
.I dest
are filled
with null wide characters.
-If the length \fIwcslen(src)\fP is greater than or equal
-to
+If the length
+.I wcslen(src)
+is greater than or equal to
.IR n ,
the string pointed to by
.I dest
.IP
.TS
L1 Lx.
-"tolower" \- realizes the \fBtolower\fP(3) mapping
-"toupper" \- realizes the \fBtoupper\fP(3) mapping
+"tolower" \- realizes the \f[B]tolower\f[](3) mapping
+"toupper" \- realizes the \f[B]toupper\f[](3) mapping
.TE
.SH RETURN VALUE
The
.IP
.TS
L1 Lx.
-"alnum" \- realizes the \fBisalnum\fP(3) classification function
-"alpha" \- realizes the \fBisalpha\fP(3) classification function
-"blank" \- realizes the \fBisblank\fP(3) classification function
-"cntrl" \- realizes the \fBiscntrl\fP(3) classification function
-"digit" \- realizes the \fBisdigit\fP(3) classification function
-"graph" \- realizes the \fBisgraph\fP(3) classification function
-"lower" \- realizes the \fBislower\fP(3) classification function
-"print" \- realizes the \fBisprint\fP(3) classification function
-"punct" \- realizes the \fBispunct\fP(3) classification function
-"space" \- realizes the \fBisspace\fP(3) classification function
-"upper" \- realizes the \fBisupper\fP(3) classification function
-"xdigit" \- realizes the \fBisxdigit\fP(3) classification function
+"alnum" \- realizes the \f[B]isalnum\f[](3) classification function
+"alpha" \- realizes the \f[B]isalpha\f[](3) classification function
+"blank" \- realizes the \f[B]isblank\f[](3) classification function
+"cntrl" \- realizes the \f[B]iscntrl\f[](3) classification function
+"digit" \- realizes the \f[B]isdigit\f[](3) classification function
+"graph" \- realizes the \f[B]isgraph\f[](3) classification function
+"lower" \- realizes the \f[B]islower\f[](3) classification function
+"print" \- realizes the \f[B]isprint\f[](3) classification function
+"punct" \- realizes the \f[B]ispunct\f[](3) classification function
+"space" \- realizes the \f[B]isspace\f[](3) classification function
+"upper" \- realizes the \f[B]isupper\f[](3) classification function
+"xdigit" \- realizes the \f[B]isxdigit\f[](3) classification function
.TE
.SH RETURN VALUE
The
.P
The following errors can occur:
.TP
-Domain error: \fIx\fP is negative
+Domain error: \f[I]x\f[] is negative
.I errno
is set to
.BR EDOM .
.RB ( FE_INVALID )
is raised.
.TP
-Pole error: \fIx\fP is 0.0
+Pole error: \f[I]x\f[] is 0.0
.\" Before POSIX.1-2001 TC2, this was (inconsistently) specified
.\" as a range error.
.I errno
.BR "#define UINT32_MAX " "/* 2**INT32_WIDTH - 1 */"
.BR "#define UINT64_MAX " "/* 2**INT64_WIDTH - 1 */"
.P
-.BI "#define INT8_C(" c ") " c " ## " "\fR/* ... */\fP"
-.BI "#define INT16_C(" c ") " c " ## " "\fR/* ... */\fP"
-.BI "#define INT32_C(" c ") " c " ## " "\fR/* ... */\fP"
-.BI "#define INT64_C(" c ") " c " ## " "\fR/* ... */\fP"
-.P
-.BI "#define UINT8_C(" c ") " c " ## " "\fR/* ... */\fP"
-.BI "#define UINT16_C(" c ") " c " ## " "\fR/* ... */\fP"
-.BI "#define UINT32_C(" c ") " c " ## " "\fR/* ... */\fP"
-.BI "#define UINT64_C(" c ") " c " ## " "\fR/* ... */\fP"
+.BI "#define INT8_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.BI "#define INT16_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.BI "#define INT32_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.BI "#define INT64_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.P
+.BI "#define UINT8_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.BI "#define UINT16_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.BI "#define UINT32_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
+.BI "#define UINT64_C(" c ") " c " ## " "\f[R]/* ... */\f[]"
.fi
.SH DESCRIPTION
.IR int N _t
.I N
being the value specified in its type name.
They are be capable of storing values in the range
-.RB [ INT \fIN\fP _MIN ,
-.BR INT \fIN\fP _MAX ],
+.RB [ INT \f[I]N\f[] _MIN ,
+.BR INT \f[I]N\f[] _MAX ],
substituting
.I N
by the appropriate number.
N being the value specified in its type name.
They are capable of storing values in the range
.RB [ 0 ,
-.BR UINT \fIN\fP _MAX ],
+.BR UINT \f[I]N\f[] _MAX ],
substituting
.I N
by the appropriate number.
and all other types of this form are optional.
.P
The macros
-.RB [ U ] INT \fIN\fP _WIDTH
+.RB [ U ] INT \f[I]N\f[] _WIDTH
expand to the width in bits of these types
.RI ( N ).
.P
The macros
-.RB [ U ] INT \fIN\fP _MAX
+.RB [ U ] INT \f[I]N\f[] _MAX
expand to the maximum value that these types can hold.
.P
The macros
expand to the minimum value that these types can hold.
.P
The macros
-.RB [ U ] INT \fIN\fP _C ()
+.RB [ U ] INT \f[I]N\f[] _C ()
expand their argument to an integer constant of type
.RI [ u ] int N _t .
.P
.BR printf (3)
family of functions
are expanded by macros of the forms
-.BR PRId \fIN\fP,
-.BR PRIi \fIN\fP,
-.BR PRIu \fIN\fP,
+.BR PRId \f[I]N\f[],
+.BR PRIi \f[I]N\f[],
+.BR PRIu \f[I]N\f[],
and
.BI PRIx N
(defined in
.BR scanf (3)
family of functions
are expanded by macros of the forms
-.BR SCNd \fIN\fP,
-.BR SCNi \fIN\fP,
-.BR SCNu \fIN\fP,
+.BR SCNd \f[I]N\f[],
+.BR SCNi \f[I]N\f[],
+.BR SCNu \f[I]N\f[],
and
.BI SCNx N,
(defined in
C99, POSIX.1-2001.
.P
The
-.RB [ U ] INT \fIN\fP _WIDTH
+.RB [ U ] INT \f[I]N\f[] _WIDTH
macros were added in C23.
.SH NOTES
The following header also provides these types:
.BR "#define INTMAX_MIN " "/* - 2**(INTMAX_WIDTH - 1) */"
.BR "#define UINTMAX_MAX " "/* 2**UINTMAX_WIDTH - 1 */"
.P
-.BI "#define INTMAX_C(" c ) " c " ## " \fR/* ... */\fP"
-.BI "#define UINTMAX_C(" c ) " c " ## " \fR/* ... */\fP"
+.BI "#define INTMAX_C(" c ) " c " ## " \f[R]/* ... */\f[]"
+.BI "#define UINTMAX_C(" c ) " c " ## " \f[R]/* ... */\f[]"
.fi
.SH DESCRIPTION
.I intmax_t
.P
.in +4n
.EX
-$ \fBcd /proc/driver/cciss\fP
-$ \fBls \-l\fP
+.RB $ " cd /proc/driver/cciss" ;
+.RB $ " ls \-l" ;
total 0
-rw\-r\-\-r\-\- 1 root root 0 2010\-09\-10 10:38 cciss0
-rw\-r\-\-r\-\- 1 root root 0 2010\-09\-10 10:38 cciss1
-rw\-r\-\-r\-\- 1 root root 0 2010\-09\-10 10:38 cciss2
-$ \fBcat cciss2\fP
+.RB $ " cat cciss2" ;
cciss2: HP Smart Array P800 Controller
Board ID: 0x3223103c
Firmware Version: 7.14
first assembled into 16-bit Unicode codes.
Otherwise, each byte is transformed according to the current mapping table
(which translates it to a Unicode value).
-See the \fBCharacter Sets\fP section below for discussion.
+See the
+.B Character Sets
+section below for discussion.
.P
In the normal case, the Unicode value is converted to a font index,
and this is stored in video memory, so that the corresponding glyph
specially.
Instead of being turned into a font index and rendered as
a glyph, it may trigger cursor movement or other control functions.
-See the \fBLinux Console Controls\fP section below for discussion.
+See the
+.B Linux Console Controls
+section below for discussion.
.P
It is generally not good practice to hard-wire terminal controls into
programs.
CR, SO, SI, CAN, SUB, ESC, DEL, CSI.
They do what one would expect:
.TP
-BEL (0x07, \fB\[ha]G\fP)
+.RB BEL\~(0x07, \~\[ha]G )
beeps;
.TP
-BS (0x08, \fB\[ha]H\fP)
+.RB BS\~(0x08, \~\[ha]H )
backspaces one column
(but not past the beginning of the line);
.TP
-HT (0x09, \fB\[ha]I\fP)
+.RB HT\~(0x09, \~\[ha]I )
goes to the next tab stop or to the end of the line
if there is no earlier tab stop;
.TP
-LF (0x0A, \fB\[ha]J\fP)
+.RB LF\~(0x0A, \~\[ha]J )
.TQ
-VT (0x0B, \fB\[ha]K\fP)
+.RB VT\~(0x0B, \~\[ha]K )
.TQ
-FF (0x0C, \fB\[ha]L\fP)
+.RB FF\~(0x0C, \~\[ha]L )
all give a linefeed,
and if LF/NL (new-line mode) is set also a carriage return;
.TP
-CR (0x0D, \fB\[ha]M\fP)
+.RB CR\~(0x0D, \~\[ha]M )
gives a carriage return;
.TP
-SO (0x0E, \fB\[ha]N\fP)
+.RB SO\~(0x0E, \~\[ha]N )
activates the G1 character set;
.TP
-SI (0x0F, \fB\[ha]O\fP)
+.RB SI\~(0x0F, \~\[ha]O )
activates the G0 character set;
.TP
-CAN (0x18, \fB\[ha]X\fP)
+.RB CAN\~(0x18, \~\[ha]X )
.TQ
-SUB (0x1A, \fB\[ha]Z\fP)
+.RB SUB\~(0x1A, \~\[ha]Z )
abort escape sequences;
.TP
-ESC (0x1B, \fB\[ha][\fP)
+.RB ESC\~(0x1B, \~\[ha][ )
starts an escape sequence;
.TP
DEL (0x7F)
T}
ESC ] R Reset palette.
ESC ] P T{
-Set palette, with parameter given in 7 hexadecimal digits \fInrrggbb\fP after
-the final P. Here \fIn\fP is the color (0\[en]15), and \fIrrggbb\fP indicates
+Set palette, with parameter given in 7 hexadecimal digits
+.I nrrggbb
+after the final P.
+Here
+.I n
+is the color (0\[en]15),
+and
+.I rrggbb
+indicates
the red/green/blue values (0\[en]255).
T}
.TE
.P
.B ECMA-48 Select Graphic Rendition
.P
-The ECMA-48 SGR sequence ESC [ \fIparameters\fP m sets display
+The ECMA-48 SGR sequence ESC [
+.I parameters
+m sets display
attributes.
Several attributes can be set in the same sequence, separated by
semicolons.
Device status report (DSR): Answer is ESC [ 0 n (Terminal OK).
.TP
ESC [ 6 n
-Cursor position report (CPR): Answer is ESC [ \fIy\fP ; \fIx\fP R,
-where \fIx,y\fP is the cursor location.
+Cursor position report (CPR): Answer is ESC [
+.I y
+;
+.I x
+R,
+where
+.I x,y
+is the cursor location.
.\"
.P
.B DEC Private Mode (DECSET/DECRST) sequences
cyan, 7 = white; 8\[en]15 = bright versions of 0\[en]7.
.TS
l lx.
-ESC [ 1 ; \fIn\fP ] T{
-Set color \fIn\fP as the underline color.
+ESC [ 1 ; \f[I]n\f[] ] T{
+Set color \f[I]n\f[] as the underline color.
T}
-ESC [ 2 ; \fIn\fP ] T{
-Set color \fIn\fP as the dim color.
+ESC [ 2 ; \f[I]n\f[] ] T{
+Set color \f[I]n\f[] as the dim color.
T}
ESC [ 8 ] T{
Make the current color pair the default attributes.
T}
-ESC [ 9 ; \fIn\fP ] T{
-Set screen blank timeout to \fIn\fP minutes.
+ESC [ 9 ; \f[I]n\f[] ] T{
+Set screen blank timeout to
+.I n
+minutes.
T}
-ESC [ 10 ; \fIn\fP ] T{
+ESC [ 10 ; \f[I]n\f[] ] T{
Set bell frequency in Hz.
T}
-ESC [ 11 ; \fIn\fP ] T{
+ESC [ 11 ; \f[I]n\f[] ] T{
Set bell duration in msec.
T}
-ESC [ 12 ; \fIn\fP ] T{
+ESC [ 12 ; \f[I]n\f[] ] T{
Bring specified console to the front.
T}
ESC [ 13 ] T{
Unblank the screen.
T}
-ESC [ 14 ; \fIn\fP ] T{
+ESC [ 14 ; \f[I]n\f[] ] T{
Set the VESA powerdown interval in minutes.
T}
ESC [ 15 ] T{
Bring the previous console to the front
(since Linux 2.6.0).
T}
-ESC [ 16 ; \fIn\fP ] T{
+ESC [ 16 ; \f[I]n\f[] ] T{
Set the cursor blink interval in milliseconds
(since Linux 4.2).
T}
There are two character sets, called G0 and G1, and one of them
is the current character set.
(Initially G0.)
-Typing \fB\[ha]N\fP causes G1 to become current,
-\fB\[ha]O\fP causes G0 to become current.
+Typing
+.B \[ha]N
+causes G1 to become current,
+.B \[ha]O
+causes G0 to become current.
.P
These variables G0 and G1 point at a translation table, and can be
changed by the user.
daemon.
.P
The mouse tracking escape sequences generated by
-\fBxterm\fP(1) encode numeric parameters in a single character as
-\fIvalue\fP+040.
+.BR xterm (1)
+encode numeric parameters in a single character as
+.IR value +040.
For example, \[aq]!\[aq] is 1.
The screen coordinate system is 1-based.
.P
The X10 compatibility mode sends an escape sequence on button press
encoding the location and the mouse button pressed.
It is enabled by sending ESC [ ? 9 h and disabled with ESC [ ? 9 l.
-On button press, \fBxterm\fP(1) sends
-ESC [ M \fIbxy\fP (6 characters).
-Here \fIb\fP is button\-1,
-and \fIx\fP and \fIy\fP are the x and y coordinates of the mouse
+On button press,
+.BR xterm (1)
+sends
+ESC [ M
+.I bxy
+(6 characters).
+Here
+.I b
+is button\-1,
+and
+.I x
+and
+.I y
+are the x and y coordinates of the mouse
when the button was pressed.
This is the same code the kernel also produces.
.P
Modifier information is also sent.
It is enabled by sending ESC [ ? 1000 h and disabled with
ESC [ ? 1000 l.
-On button press or release, \fBxterm\fP(1) sends ESC [ M
-\fIbxy\fP.
-The low two bits of \fIb\fP encode button information:
+On button press or release,
+.BR xterm (1)
+sends ESC [ M
+.IR bxy .
+The low two bits of
+.I b
+encode button information:
0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release.
The upper bits encode what modifiers were down when the button was
pressed and are added together: 4=Shift, 8=Meta, 16=Control.
-Again \fIx\fP and
-\fIy\fP are the x and y coordinates of the mouse event.
+Again
+.I x
+and
+.I y
+are the x and y coordinates of the mouse event.
The upper left corner is (1,1).
.SS Comparisons with other terminals
Many different terminal types are described, like the Linux console,
ENQ (0x05)
triggered an answerback message;
.TP
-DC1 (0x11, \fB\[ha]Q\fP, XON)
+.RB DC1\~(0x11, \~\[ha]Q ,\~XON)
resumed transmission;
.TP
-DC3 (0x13, \fB\[ha]S\fP, XOFF)
+.RB DC3\~(0x13, \~\[ha]S ,\~XOFF)
caused VT100 to ignore (and stop transmitting)
all codes except XOFF and XON.
.P
the DEC special character and line drawing set, UK, and US-ASCII,
respectively.
.P
-The user can configure \fBxterm\fP(1) to respond to VT220-specific
+The user can configure
+.BR xterm (1)
+to respond to VT220-specific
control sequences, and it will identify itself as a VT52, VT100, and
up depending on the way it is configured and initialized.
.P
It accepts ESC ] (OSC) for the setting of certain resources.
In addition to the ECMA-48 string terminator (ST),
-\fBxterm\fP(1) accepts a BEL to terminate an OSC string.
-These are a few of the OSC control sequences recognized by \fBxterm\fP(1):
+.BR xterm (1)
+accepts a BEL to terminate an OSC string.
+These are a few of the OSC control sequences recognized by
+.BR xterm (1):
.TS
l l.
-ESC ] 0 ; \fItxt\fP ST T{
-Set icon name and window title to \fItxt\fP.
-T}
-ESC ] 1 ; \fItxt\fP ST Set icon name to \fItxt\fP.
-ESC ] 2 ; \fItxt\fP ST Set window title to \fItxt\fP.
-ESC ] 4 ; \fInum\fP; \fItxt\fP ST Set ANSI color \fInum\fP to \fItxt\fP.
-ESC ] 10 ; \fItxt\fP ST Set dynamic text color to \fItxt\fP.
-ESC ] 4 6 ; \fIname\fP ST T{
-Change log file to \fIname\fP (normally disabled by a compile-time option).
-T}
-ESC ] 5 0 ; \fIfn\fP ST Set font to \fIfn\fP.
+ESC ] 0 ; \f[I]txt\f[] ST T{
+Set icon name and window title to
+.IR txt .
+T}
+ESC ] 1 ; \f[I]txt\f[] ST Set icon name to \f[I]txt\f[].
+ESC ] 2 ; \f[I]txt\f[] ST Set window title to \f[I]txt\f[].
+ESC ] 4 ; \f[I]num\f[]; \f[I]txt\f[] ST Set ANSI color \f[I]num\f[] to \f[I]txt\f[].
+ESC ] 10 ; \f[I]txt\f[] ST Set dynamic text color to \f[I]txt\f[].
+ESC ] 4 6 ; \f[I]name\f[] ST T{
+Change log file to
+.I name
+(normally disabled by a compile-time option).
+T}
+ESC ] 5 0 ; \f[I]fn\f[] ST Set font to \f[I]fn\f[].
.TE
.P
It recognizes the following with slightly modified meaning
Cursor to lower left corner of screen (if enabled
by
.BR xterm (1)'s
-\fBhpLowerleftBugCompat\fP resource).
+.B hpLowerleftBugCompat
+resource).
T}
ESC l Memory lock (per HP terminals).
Locks memory above the cursor.
.P
.B CSI Sequences
.P
-Old versions of \fBxterm\fP(1), for example, from X11R5,
+Old versions of
+.BR xterm (1),
+for example, from X11R5,
interpret the blink SGR as a bold SGR.
Later versions which implemented ANSI colors, for example,
XFree86 3.1.2A in 1995, improved this by allowing
the X11R6.8 release, which incorporated XFree86 xterm.
All ECMA-48 CSI sequences recognized by Linux are also recognized by
.IR xterm ,
-however \fBxterm\fP(1) implements several ECMA-48 and DEC control sequences
+however
+.BR xterm (1)
+implements several ECMA-48 and DEC control sequences
not recognized by Linux.
.P
-The \fBxterm\fP(1)
+The
+.BR xterm (1)
program recognizes all of the DEC Private Mode sequences listed
above, but none of the Linux private-mode sequences.
-For discussion of \fBxterm\fP(1)'s
+For discussion of
+.BR xterm (1)'s
own private-mode sequences, refer to the
-\fIXterm Control Sequences\fP
+.I Xterm Control Sequences
document by
Edward Moy,
Stephen Gildea,
.P
details changes to xterm.
.P
-The \fIvttest\fP program
+The
+.I vttest
+program
.P
.RS
.UR http://invisible\-island.net\:/vttest/
.RE
.P
demonstrates many of these control sequences.
-The \fBxterm\fP(1) source distribution also contains sample
+The
+.BR xterm (1)
+source distribution also contains sample
scripts which exercise other features.
.SH NOTES
ESC 8 (DECRC) is not able to restore the character set changed with
In particular, those ending with ] do not use a standard terminating
character.
The OSC (set palette) sequence is a greater problem,
-since \fBxterm\fP(1) may interpret this as a control sequence
+since
+.BR xterm (1)
+may interpret this as a control sequence
which requires a string terminator (ST).
-Unlike the \fBsetterm\fP(1) sequences which will be ignored (since
+Unlike the
+.BR setterm (1)
+sequences which will be ignored (since
they are invalid control sequences), the palette sequence will make
-\fBxterm\fP(1) appear to hang (though pressing the return-key
+.B xterm (1)
+appear to hang (though pressing the return-key
will fix that).
To accommodate applications which have been hardcoded to use Linux
control sequences,
-set the \fBxterm\fP(1) resource \fBbrokenLinuxOSC\fP to true.
+set the
+.BR xterm (1)
+resource
+.B brokenLinuxOSC
+to true.
.P
An older version of this document implied that Linux recognizes the
ECMA-48 control sequence for invisible text.
.SH DESCRIPTION
The Motorola DSP56001 is a fully programmable 24-bit digital signal
processor found in Atari Falcon030-compatible computers.
-The \fIdsp56k\fP special file is used to control the DSP56001, and
+The
+.I dsp56k
+special file is used to control the DSP56001, and
to send and receive data using the bidirectional handshaked host
port.
.P
The following
.BR ioctl (2)
calls are used to control the
-\fIdsp56k\fP device:
+.I dsp56k
+device:
.TP
.B DSP56K_UPLOAD
resets the DSP56001 and uploads a program.
The third
.BR ioctl (2)
-argument must be a pointer to a \fIstruct dsp56k_upload\fP with members
-\fIbin\fP pointing to a DSP56001 binary program, and \fIlen\fP set to
+argument must be a pointer to a
+.I struct\~dsp56k_upload
+with members
+.I .bin
+pointing to a DSP56001 binary program, and
+.I .len
+set to
the length of the program, counted in 24-bit words.
.TP
.B DSP56K_SET_TX_WSIZE
To access the host flags, the third
.BR ioctl (2)
argument must be a pointer
-to a \fIstruct dsp56k_host_flags\fP.
+to a
+.IR struct\~dsp56k_host_flags .
If bit 0 or 1 is set in the
-\fIdir\fP member, the corresponding bit in \fIout\fP will be written
+.I .dir
+member, the corresponding bit in
+.I .out
+will be written
to the host flags.
The state of all host flags will be returned in
-the lower four bits of the \fIstatus\fP member.
+the lower four bits of the
+.I .status
+member.
.TP
.B DSP56K_HOST_CMD
sends a host command.
To this base number, add the drive's
number on its controller and 128 if the drive is on the secondary
controller.
-In the following device tables, \fIn\fP represents the
+In the following device tables,
+.I n
+represents the
drive number.
.P
-\fBWarning: if you use formats with more tracks
-than supported by your drive, you may cause it mechanical damage.\fP
+.B Warning:
+.B if you use formats with more tracks
+.B than supported by your drive,
+.B you may cause it mechanical damage.
Trying once if more tracks than the usual 40/80 are supported should not
damage it, but no warranty is given for that.
If you are not sure, don't create device
Name Base
minor #
_
-\fBfd\fP\fIn\fP 0
+\f[B]fd\f[]\f[I]n\f[] 0
.TE
.P
5.25 inch double-density device files:
Name Capacity Cyl. Sect. Heads Base
KiB minor #
_
-\fBfd\fP\fIn\fP\fBd360\fP 360 40 9 2 4
+\f[B]fd\f[]\f[I]n\f[]\f[B]d360\f[] 360 40 9 2 4
.TE
.P
5.25 inch high-density device files:
Name Capacity Cyl. Sect. Heads Base
KiB minor #
_
-\fBfd\fP\fIn\fP\fBh360\fP 360 40 9 2 20
-\fBfd\fP\fIn\fP\fBh410\fP 410 41 10 2 48
-\fBfd\fP\fIn\fP\fBh420\fP 420 42 10 2 64
-\fBfd\fP\fIn\fP\fBh720\fP 720 80 9 2 24
-\fBfd\fP\fIn\fP\fBh880\fP 880 80 11 2 80
-\fBfd\fP\fIn\fP\fBh1200\fP 1200 80 15 2 8
-\fBfd\fP\fIn\fP\fBh1440\fP 1440 80 18 2 40
-\fBfd\fP\fIn\fP\fBh1476\fP 1476 82 18 2 56
-\fBfd\fP\fIn\fP\fBh1494\fP 1494 83 18 2 72
-\fBfd\fP\fIn\fP\fBh1600\fP 1600 80 20 2 92
+\f[B]fd\f[]\f[I]n\f[]\f[B]h360\f[] 360 40 9 2 20
+\f[B]fd\f[]\f[I]n\f[]\f[B]h410\f[] 410 41 10 2 48
+\f[B]fd\f[]\f[I]n\f[]\f[B]h420\f[] 420 42 10 2 64
+\f[B]fd\f[]\f[I]n\f[]\f[B]h720\f[] 720 80 9 2 24
+\f[B]fd\f[]\f[I]n\f[]\f[B]h880\f[] 880 80 11 2 80
+\f[B]fd\f[]\f[I]n\f[]\f[B]h1200\f[] 1200 80 15 2 8
+\f[B]fd\f[]\f[I]n\f[]\f[B]h1440\f[] 1440 80 18 2 40
+\f[B]fd\f[]\f[I]n\f[]\f[B]h1476\f[] 1476 82 18 2 56
+\f[B]fd\f[]\f[I]n\f[]\f[B]h1494\f[] 1494 83 18 2 72
+\f[B]fd\f[]\f[I]n\f[]\f[B]h1600\f[] 1600 80 20 2 92
.TE
.P
3.5 inch double-density device files:
Name Capacity Cyl. Sect. Heads Base
KiB minor #
_
-\fBfd\fP\fIn\fP\fBu360\fP 360 80 9 1 12
-\fBfd\fP\fIn\fP\fBu720\fP 720 80 9 2 16
-\fBfd\fP\fIn\fP\fBu800\fP 800 80 10 2 120
-\fBfd\fP\fIn\fP\fBu1040\fP 1040 80 13 2 84
-\fBfd\fP\fIn\fP\fBu1120\fP 1120 80 14 2 88
+\f[B]fd\f[]\f[I]n\f[]\f[B]u360\f[] 360 80 9 1 12
+\f[B]fd\f[]\f[I]n\f[]\f[B]u720\f[] 720 80 9 2 16
+\f[B]fd\f[]\f[I]n\f[]\f[B]u800\f[] 800 80 10 2 120
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1040\f[] 1040 80 13 2 84
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1120\f[] 1120 80 14 2 88
.TE
.P
3.5 inch high-density device files:
Name Capacity Cyl. Sect. Heads Base
KiB minor #
_
-\fBfd\fP\fIn\fP\fBu360\fP 360 40 9 2 12
-\fBfd\fP\fIn\fP\fBu720\fP 720 80 9 2 16
-\fBfd\fP\fIn\fP\fBu820\fP 820 82 10 2 52
-\fBfd\fP\fIn\fP\fBu830\fP 830 83 10 2 68
-\fBfd\fP\fIn\fP\fBu1440\fP 1440 80 18 2 28
-\fBfd\fP\fIn\fP\fBu1600\fP 1600 80 20 2 124
-\fBfd\fP\fIn\fP\fBu1680\fP 1680 80 21 2 44
-\fBfd\fP\fIn\fP\fBu1722\fP 1722 82 21 2 60
-\fBfd\fP\fIn\fP\fBu1743\fP 1743 83 21 2 76
-\fBfd\fP\fIn\fP\fBu1760\fP 1760 80 22 2 96
-\fBfd\fP\fIn\fP\fBu1840\fP 1840 80 23 2 116
-\fBfd\fP\fIn\fP\fBu1920\fP 1920 80 24 2 100
+\f[B]fd\f[]\f[I]n\f[]\f[B]u360\f[] 360 40 9 2 12
+\f[B]fd\f[]\f[I]n\f[]\f[B]u720\f[] 720 80 9 2 16
+\f[B]fd\f[]\f[I]n\f[]\f[B]u820\f[] 820 82 10 2 52
+\f[B]fd\f[]\f[I]n\f[]\f[B]u830\f[] 830 83 10 2 68
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1440\f[] 1440 80 18 2 28
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1600\f[] 1600 80 20 2 124
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1680\f[] 1680 80 21 2 44
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1722\f[] 1722 82 21 2 60
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1743\f[] 1743 83 21 2 76
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1760\f[] 1760 80 22 2 96
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1840\f[] 1840 80 23 2 116
+\f[B]fd\f[]\f[I]n\f[]\f[B]u1920\f[] 1920 80 24 2 100
.TE
.P
3.5 inch extra-density device files:
Name Capacity Cyl. Sect. Heads Base
KiB minor #
_
-\fBfd\fP\fIn\fP\fBu2880\fP 2880 80 36 2 32
-\fBfd\fP\fIn\fP\fBCompaQ\fP 2880 80 36 2 36
-\fBfd\fP\fIn\fP\fBu3200\fP 3200 80 40 2 104
-\fBfd\fP\fIn\fP\fBu3520\fP 3520 80 44 2 108
-\fBfd\fP\fIn\fP\fBu3840\fP 3840 80 48 2 112
+\f[B]fd\f[]\f[I]n\f[]\f[B]u2880\f[] 2880 80 36 2 32
+\f[B]fd\f[]\f[I]n\f[]\f[B]CompaQ\f[] 2880 80 36 2 36
+\f[B]fd\f[]\f[I]n\f[]\f[B]u3200\f[] 3200 80 40 2 104
+\f[B]fd\f[]\f[I]n\f[]\f[B]u3520\f[] 3520 80 44 2 108
+\f[B]fd\f[]\f[I]n\f[]\f[B]u3840\f[] 3840 80 48 2 112
.TE
.SH DESCRIPTION
-\fBfd\fP special files access the floppy disk drives in raw mode.
+.B fd
+special files access the floppy disk drives in raw mode.
The following
.BR ioctl (2)
-calls are supported by \fBfd\fP devices:
+calls are supported by
+.B fd
+devices:
.TP
.B FDCLRPRM
clears the media information of a drive (geometry of disk in drive).
The media information will not be lost when the media is changed.
This will disable autodetection.
In order to reenable autodetection, you
-have to issue an \fBFDCLRPRM\fP.
+have to issue an
+.BR FDCLRPRM .
.TP
.B FDGETDRVTYP
returns the type of a drive (name parameter).
For formats which work
-in several drive types, \fBFDGETDRVTYP\fP returns a name which is
+in several drive types,
+.B FDGETDRVTYP
+returns a name which is
appropriate for the oldest drive type which supports this format.
.TP
.B FDFLUSH
.B FDRAWCMD
sends a raw command to the floppy controller.
.P
-For more precise information, consult also the \fI<linux/fd.h>\fP and
-\fI<linux/fdreg.h>\fP include files, as well as the
+For more precise information, consult also the
+.I <linux/fd.h>
+and
+.I <linux/fdreg.h>
+include files, as well as the
.BR floppycontrol (1)
manual page.
.SH FILES
.IP
.in +4n
.EX
-# \fBcd /sys/class/scsi_host/host4\fP
-# \fBcat firmware_revision\fP
+.RB # " cd /sys/class/scsi_host/host4" ;
+.RB # " cat firmware_revision" ;
7.14
.EE
.in
.IP
.in +4n
.EX
-# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
-# \fBcat unique_id\fP
+.RB # " cd /sys/class/scsi_disk/4:0:0:0/device" ;
+.RB # " cat unique_id" ;
600508B1001044395355323037570F77
.EE
.in
.IP
.in +4n
.EX
-# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
-# \fBcat raid_level\fP
+.RB # " cd /sys/class/scsi_disk/4:0:0:0/device" ;
+.RB # " cat raid_level" ;
RAID 0
.EE
.in
.IP
.in +4n
.EX
-# \fBcd /sys/class/scsi_disk/4:0:0:0/device\fP
-# \fBcat lunid\fP
+.RB # " cd /sys/class/scsi_disk/4:0:0:0/device" ;
+.RB # " cat lunid" ;
0x0000004000000000
.EE
.in
Sometimes, this kind of hardware also supports
sending IR data.
.P
-The \fBLIRC_GET_FEATURES\fR ioctl (see below) allows probing for whether
+The
+.B LIRC_GET_FEATURES
+ioctl (see below) allows probing for whether
receiving and sending is supported, and in which modes, amongst other
features.
.\"
.SS Reading input with the LIRC_MODE_MODE2 mode
-In the \fBLIRC_MODE_MODE2 mode\fR, the data returned by
+In the
+.B LIRC_MODE_MODE2
+mode,
+the data returned by
.BR read (2)
provides 32-bit values representing a space or a pulse duration.
The time of the duration (microseconds) is encoded in the lower 24 bits.
and as a result data is missing
(since Linux 5.18).
.SS Reading input with the LIRC_MODE_SCANCODE mode
-In the \fBLIRC_MODE_SCANCODE\fR
+In the
+.B LIRC_MODE_SCANCODE
mode, the data returned by
.BR read (2)
-reflects decoded button presses, in the struct \fIlirc_scancode\fR.
-The scancode is stored in the \fIscancode\fR field, and the IR protocol
-is stored in \fIrc_proto\fR.
-This field has one the values of the \fIenum rc_proto\fR.
+reflects decoded button presses, in the struct
+.IR lirc_scancode .
+The scancode is stored in the
+.I scancode
+field, and the IR protocol
+is stored in
+.IR rc_proto .
+This field has one the values of the
+.IR enum\~rc_proto .
.\"
.SS Writing output with the LIRC_MODE_PULSE mode
The data written to the character device using
.BR EINVAL .
.SS Writing output with the LIRC_MODE_SCANCODE mode
The data written to the character devices must be a single struct
-\fIlirc_scancode\fR.
-The \fIscancode\fR and \fIrc_proto\fR fields must
+.IR lirc_scancode .
+The
+.I scancode
+and
+.I rc_proto
+fields must be
filled in, all other fields must be 0.
The kernel IR encoders will
convert the scancode to pulses and spaces.
.B lirc
hardware settings.
.SS Always Supported Commands
-\fI/dev/lirc*\fR devices always support the following commands:
+.IR /dev/lirc *
+devices always support the following commands:
.TP 4
-.BR LIRC_GET_FEATURES " (\fIvoid\fP)"
+.BR LIRC_GET_FEATURES " (\f[I]void\f[])"
Returns a bit mask of combined features bits; see FEATURES.
.P
If a device returns an error code for
Some
.B lirc
devices support the commands listed below.
-Unless otherwise stated, these fail with the error \fBENOTTY\fR if the
-operation isn't supported, or with the error \fBEINVAL\fR if the operation
-failed, or invalid arguments were provided.
+Unless otherwise stated,
+these fail with the error
+.B ENOTTY
+if the operation isn't supported,
+or with the error
+.B EINVAL
+if the operation failed,
+or invalid arguments were provided.
If a driver does not announce support of certain features, invoking
the corresponding ioctls will fail with the error
.BR ENOTTY .
.TP
-.BR LIRC_GET_REC_MODE " (\fIvoid\fP)"
+.BR LIRC_GET_REC_MODE " (\f[I]void\f[])"
If the
.B lirc
device has no receiver, this operation fails with the error
a decoded button press.
.RE
.TP
-.BR LIRC_SET_REC_MODE " (\fIint\fP)"
+.BR LIRC_SET_REC_MODE " (\f[I]int\f[])"
Set the receive mode.
.I val
is either
device has no receiver, this operation fails with the error
.B ENOTTY.
.TP
-.BR LIRC_GET_SEND_MODE " (\fIvoid\fP)"
+.BR LIRC_GET_SEND_MODE " (\f[I]void\f[])"
Return the send mode.
.B LIRC_MODE_PULSE
or
device cannot send, this operation fails with the error
.B ENOTTY.
.TP
-.BR LIRC_SET_SEND_MODE " (\fIint\fP)"
+.BR LIRC_SET_SEND_MODE " (\f[I]int\f[])"
Set the send mode.
.I val
is either
device cannot send, this operation fails with the error
.BR ENOTTY .
.TP
-.BR LIRC_SET_SEND_CARRIER " (\fIint\fP)"
+.BR LIRC_SET_SEND_CARRIER " (\f[I]int\f[])"
Set the modulation frequency.
The argument is the frequency (Hz).
.TP
-.BR LIRC_SET_SEND_DUTY_CYCLE " (\fIint\fP)"
+.BR LIRC_SET_SEND_DUTY_CYCLE " (\f[I]int\f[])"
Set the carrier duty cycle.
.I val
is a number in the range [0,100] which
will fail with the error
.BR ENOTTY .
.TP
-.BR LIRC_SET_REC_TIMEOUT " (\fIint\fP)"
+.BR LIRC_SET_REC_TIMEOUT " (\f[I]int\f[])"
Set the integer value for IR inactivity timeout (microseconds).
To be accepted, the value must be within the limits defined by
.B LIRC_GET_MIN_TIMEOUT
.I greater
than the given value should be set.
.TP
-.BR LIRC_GET_REC_TIMEOUT " (\fIvoid\fP)"
+.BR LIRC_GET_REC_TIMEOUT " (\f[I]void\f[])"
Return the current inactivity timeout (microseconds).
Available since Linux 4.18.
.TP
-.BR LIRC_SET_REC_TIMEOUT_REPORTS " (\fIint\fP)"
+.BR LIRC_SET_REC_TIMEOUT_REPORTS " (\f[I]int\f[])"
Enable
.RI ( val
is 1) or disable
referring to that device (until timeouts are disabled again).
.RE
.TP
-.BR LIRC_SET_REC_CARRIER " (\fIint\fP)"
+.BR LIRC_SET_REC_CARRIER " (\f[I]int\f[])"
Set the upper bound of the receive carrier frequency (Hz).
See
.BR LIRC_SET_REC_CARRIER_RANGE .
.TP
-.BR LIRC_SET_REC_CARRIER_RANGE " (\fIint\fP)"
+.BR LIRC_SET_REC_CARRIER_RANGE " (\f[I]int\f[])"
Sets the lower bound of the receive carrier frequency (Hz).
For this to take affect, first set the lower bound using the
.B LIRC_SET_REC_CARRIER_RANGE
.B LIRC_SET_REC_CARRIER
ioctl.
.TP
-.BR LIRC_SET_MEASURE_CARRIER_MODE " (\fIint\fP)"
+.BR LIRC_SET_MEASURE_CARRIER_MODE " (\f[I]int\f[])"
Enable
.RI ( val
is 1) or disable
packets.
By default, this should be turned off.
.TP
-.BR LIRC_GET_REC_RESOLUTION " (\fIvoid\fP)"
+.BR LIRC_GET_REC_RESOLUTION " (\f[I]void\f[])"
Return the driver resolution (microseconds).
.TP
-.BR LIRC_SET_TRANSMITTER_MASK " (\fIint\fP)"
+.BR LIRC_SET_TRANSMITTER_MASK " (\f[I]int\f[])"
Enable the set of transmitters specified in
.IR val ,
which contains a bit mask where each enabled transmitter is a 1.
this operation returns the
number of available transmitters and does nothing otherwise.
.TP
-.BR LIRC_SET_WIDEBAND_RECEIVER " (\fIint\fP)"
+.BR LIRC_SET_WIDEBAND_RECEIVER " (\f[I]int\f[])"
Some devices are equipped with a special wide band receiver which is
intended to be used to learn the output of an existing remote.
This ioctl can be used to enable
.P
.in +4n
.EX
-$ \fBdd if=/dev/zero of=file.img bs=1MiB count=10\fP
-$ \fBsudo losetup /dev/loop4 file.img\fP
-$ \fBsudo mkfs \-t ext4 /dev/loop4\fP
-$ \fBsudo mkdir /myloopdev\fP
-$ \fBsudo mount /dev/loop4 /myloopdev\fP
+.RB $ " dd if=/dev/zero of=file.img bs=1MiB count=10" ;
+.RB $ " sudo losetup /dev/loop4 file.img" ;
+.RB $ " sudo mkfs \-t ext4 /dev/loop4" ;
+.RB $ " sudo mkdir /myloopdev" ;
+.RB $ " sudo mount /dev/loop4 /myloopdev" ;
.EE
.in
.P
.P
.in +4n
.EX
-$ \fBdd if=/dev/zero of=file.img bs=1MiB count=10\fP
+.RB $ " dd if=/dev/zero of=file.img bs=1MiB count=10" ;
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.00609385 s, 1.7 GB/s
-$ \fBsudo ./mnt_loop file.img\fP
+.RB $ " sudo ./mnt_loop file.img" ;
loopname = /dev/loop5
.EE
.in
.B #include <linux/lp.h>
.fi
.SH CONFIGURATION
-\fBlp\fP[0\[en]2] are character devices for the parallel line printers;
+.BR lp [0\[en]2]
+are character devices for the parallel line printers;
they have major number 6 and minor number 0\[en]2.
The minor numbers
correspond to the printer port base addresses 0x03bc, 0x0378, and 0x0278.
.BI "int ioctl(" fd ", RND" request ", " param ");"
.fi
.SH DESCRIPTION
-The character special files \fI/dev/random\fP and
-\fI/dev/urandom\fP (present since Linux 1.3.30)
+The character special files
+.I /dev/random
+and
+.I /dev/urandom
+(present since Linux 1.3.30)
provide an interface to the kernel's random number generator.
The file
.I /dev/random
.\" commit 9b4d008787f864f17d008c9c15bbe8a0f7e2fc24
If this is of concern in your application, use
.BR getrandom (2)
-or \fI/dev/random\fP instead.
+or
+.I /dev/random
+instead.
.P
-The \fI/dev/random\fP device is a legacy interface which dates back to
+The
+.I /dev/random
+device is a legacy interface which dates back to
a time where the cryptographic primitives used in the implementation
-of \fI/dev/urandom\fP were not widely trusted.
+of
+.I /dev/urandom
+were not widely trusted.
It will return random bytes only within the estimated number of
bits of fresh noise in the entropy pool, blocking if necessary.
-\fI/dev/random\fP is suitable for applications that need
+.I /dev/random
+is suitable for applications that need
high quality randomness, and can afford indeterminate delays.
.P
-When the entropy pool is empty, reads from \fI/dev/random\fP will block
+When the entropy pool is empty, reads from
+.I /dev/random
+will block
until additional environmental noise is gathered.
Since Linux 5.6, the
.B O_NONBLOCK
.\" SEC_XFER_SIZE in drivers/char/random.c
(340 bytes before Linux 2.6.12).
.P
-Writing to \fI/dev/random\fP or \fI/dev/urandom\fP will update the
+Writing to
+.I /dev/random
+or
+.I /dev/urandom
+will update the
entropy pool with the data written, but this will not result in a
higher entropy count.
This means that it will impact the contents
read from both files, but it will not make reads from
-\fI/dev/random\fP faster.
+.I /dev/random
+faster.
.SS Usage
The
.I /dev/random
.\"
.SS Configuration
If your system does not have
-\fI/dev/random\fP and \fI/dev/urandom\fP created already, they
+.I /dev/random
+and
+.I /dev/urandom
+created already, they
can be created with the following commands:
.P
.in +4n
.SS ioctl(2) interface
The following
.BR ioctl (2)
-requests are defined on file descriptors connected to either \fI/dev/random\fP
-or \fI/dev/urandom\fP.
+requests are defined on file descriptors connected to either
+.I /dev/random
+or
+.IR /dev/urandom .
All requests performed will interact with the input
-entropy pool impacting both \fI/dev/random\fP and \fI/dev/urandom\fP.
+entropy pool impacting both
+.I /dev/random
+and
+.IR /dev/urandom .
The
.B CAP_SYS_ADMIN
capability is required for all requests except
.B RNDADDENTROPY
Add some additional entropy to the input pool,
incrementing the entropy count.
-This differs from writing to \fI/dev/random\fP or \fI/dev/urandom\fP,
+This differs from writing to
+.I /dev/random
+or
+.IR /dev/urandom ,
which only adds some
data but does not increment the entropy count.
The following structure is used:
lb lb lb lb lb lb
l l l l l l.
ConType DupCap AutoNeg FlowCtrl Role Speed
-\fIAuto\fP Both On SymOrRem Auto Auto
-\fI100FD\fP Full Off None Auto 100
-\fI100HD\fP Half Off None Auto 100
-\fI10FD\fP Full Off None Auto 10
-\fI10HD\fP Half Off None Auto 10
+\f[I]Auto\f[] Both On SymOrRem Auto Auto
+\f[I]100FD\f[] Full Off None Auto 100
+\f[I]100HD\f[] Half Off None Auto 100
+\f[I]10FD\f[] Full Off None Auto 10
+\f[I]10HD\f[] Half Off None Auto 10
.TE
.IP
Stating any other port parameter together with this
.SH DESCRIPTION
.B smartpqi
is a SCSI driver for Microchip Smart Storage controllers.
-.SS Supported \f[BI]ioctl\fP\/() operations
+.SS Supported \f[BI]ioctl\f[]() operations
For compatibility with applications written for the
.BR cciss (4)
and
.TS
l l
---
-l l.
+lB l.
parameter action
-\fBnone\fP take controller offline only
-\fBreboot\fP reboot the system
-\fBpanic\fP panic the system
+none take controller offline only
+reboot reboot the system
+panic panic the system
.TE
.TP
.BR expose_ld_first= { 0 | 1 }
and
.IR /dev/sg *,
respectively.
-.SS SmartPQI-specific host attribute files in \f[BI]/sys\fP
+.SS SmartPQI-specific host attribute files in \f[BI]/sys\f[]
.TP
.IR /sys/class/scsi_host/host * /rescan
The host
.B echo 1 > /sys/class/scsi_host/host1/enable_r6_writes
.EE
.in
-.SS SmartPQI-specific disk attribute files in \f[BI]/sys\fP
+.SS SmartPQI-specific disk attribute files in \f[BI]/sys\f[]
In the file specifications below,
.I c
stands for the number of the appropriate SCSI controller,
.EE
.in
.TP
-\fImt_type\fP
+.I mt_type
The header file defines many values for
.IR mt_type ,
but the current driver reports only the generic types
.B MT_ISSCSI2
(Generic SCSI-2 tape).
.TP
-\fImt_resid\fP
+.I mt_resid
contains the current tape partition number.
.TP
-\fImt_dsreg\fP
+.I mt_dsreg
reports the drive's current settings for block size (in the low 24
bits) and density (in the high 8 bits).
These fields are defined by
and
.BR MT_ST_DENSITY_MASK .
.TP
-\fImt_gstat\fP
+.I mt_gstat
reports generic (device independent) status information.
The header file defines macros for testing these status bits:
.RS
.TP
-\fBGMT_EOF\fP(\fIx\fP)
+.BR GMT_EOF (\f[I]x\f[])
The tape is positioned just after a filemark
(always false after an
.B MTSEEK
operation).
.TP
-\fBGMT_BOT\fP(\fIx\fP)
+.BR GMT_BOT (\f[I]x\f[])
The tape is positioned at the beginning of the first file (always false
after an
.B MTSEEK
operation).
.TP
-\fBGMT_EOT\fP(\fIx\fP)
+.BR GMT_EOT (\f[I]x\f[])
A tape operation has reached the physical End Of Tape.
.TP
-\fBGMT_SM\fP(\fIx\fP)
+.BR GMT_SM (\f[I]x\f[])
The tape is currently positioned at a setmark
(always false after an
.B MTSEEK
operation).
.TP
-\fBGMT_EOD\fP(\fIx\fP)
+.BR GMT_EOD (\f[I]x\f[])
The tape is positioned at the end of recorded data.
.TP
-\fBGMT_WR_PROT\fP(\fIx\fP)
+.BR GMT_WR_PROT (\f[I]x\f[])
The drive is write-protected.
For some drives this can also mean that the drive does not support
writing on the current medium type.
.TP
-\fBGMT_ONLINE\fP(\fIx\fP)
+.BR GMT_ONLINE (\f[I]x\f[])
The last
.BR open (2)
found the drive with a tape in place and ready for operation.
.TP
-\fBGMT_D_6250\fP(\fIx\fP)
+.BR GMT_D_6250 (\f[I]x\f[])
.TQ
-\fBGMT_D_1600\fP(\fIx\fP)
+.BR GMT_D_1600 (\f[I]x\f[])
.TQ
-\fBGMT_D_800\fP(\fIx\fP)
+.BR GMT_D_800 (\f[I]x\f[])
This \[lq]generic\[rq] status information reports the current
density setting for 9-track \(12" tape drives only.
.TP
-\fBGMT_DR_OPEN\fP(\fIx\fP)
+.BR GMT_DR_OPEN (\f[I]x\f[])
The drive does not have a tape in place.
.TP
-\fBGMT_IM_REP_EN\fP(\fIx\fP)
+.BR GMT_IM_REP_EN (\f[I]x\f[])
Immediate report mode.
This bit is set if there are no guarantees that
the data has been physically written to the tape when the write call
It is set zero only when the driver does not buffer data and
the drive is set not to buffer data.
.TP
-\fBGMT_CLN\fP(\fIx\fP)
+.BR GMT_CLN (\f[I]x\f[])
The drive has requested cleaning.
Implemented since Linux 2.4.19 and Linux 2.5.43.
.RE
.TP
-\fImt_erreg\fP
+.I mt_erreg
The only field defined in
.I mt_erreg
is the recovered error count in the low 16 bits (as defined by
count is often not maintained (most drives do not by default report
soft errors but this can be changed with a SCSI MODE SELECT command).
.TP
-\fImt_fileno\fP
+.I mt_fileno
reports the current file number (zero-based).
This value is set to \-1 when the file number is unknown (e.g., after
.B MTBSS
or
.BR MTSEEK ).
.TP
-\fImt_blkno\fP
+.I mt_blkno
reports the block number (zero-based) within the current file.
This value is set to \-1 when the block number is unknown (e.g., after
.BR MTBSF ,
.P
.in +4n
.EX
-# \fBip link add ve_A type veth peer name ve_B\fP # Create veth pair
-# \fBethtool \-S ve_A\fP # Discover interface index of peer
+.RB # " ip link add ve_A type veth peer name ve_B" "; # Create veth pair"
+.RB # " ethtool \-S ve_A" "; # Discover interface index of peer"
NIC statistics:
peer_ifindex: 16
-# \fBip link | grep \[aq]\[ha]16:\[aq]\fP # Look up interface
+.RB # " ip link | grep \[aq]\[ha]16:\[aq]" "; # Look up interface"
16: ve_B@ve_A: <BROADCAST,MULTICAST,M\-DOWN> mtu 1500 qdisc ...
.EE
.in
char ac_comm[ACCT_COMM+1];
/* Command name (basename of last
executed command; null\-terminated) */
- char ac_pad[\fIX\fP]; /* padding bytes */
+ char ac_pad[\f[I]X\f[]]; /* padding bytes */
};
\&
enum { /* Bits that may be set in ac_flag field */
Numeric real GID of dumped process.
.TP
%h
-Hostname (same as \fInodename\fP returned by \fBuname\fP(2)).
+Hostname (same as
+.I nodename
+returned by
+.BR uname (2)).
.TP
%i
TID of thread that triggered core dump,
Since Linux 2.6.19, Linux supports an alternate syntax for the
.I /proc/sys/kernel/core_pattern
file.
-If the first character of this file is a pipe symbol (\fB|\fP),
+If the first character of this file is a pipe symbol
+.RI ( | ),
then the remainder of the line is interpreted as the command-line for
a user-space program (or script) that is to be executed.
.P
Note the following points:
.IP \[bu] 3
The program must be specified using an absolute pathname (or a
-pathname relative to the root directory, \fI/\fP),
+pathname relative to the root directory,
+.IR / ),
and must immediately follow the '|' character.
.IP \[bu]
The command-line arguments can include any of
.P
.in +4n
.EX
-$ \fBcat /proc/sys/kernel/core_pattern\fP
+.RB $ " cat /proc/sys/kernel/core_pattern" ;
|/usr/lib/systemd/systemd\-coredump %P %u %g %s %t %c %e
.EE
.in
.BR coredumpctl (1):
.P
.EX
-$ \fBcoredumpctl list | tail \-5\fP
+.RB $ " coredumpctl list | tail \-5" ;
Wed 2017\-10\-11 22:25:30 CEST 2748 1000 1000 3 present /usr/bin/sleep
Thu 2017\-10\-12 06:29:10 CEST 2716 1000 1000 3 present /usr/bin/sleep
Thu 2017\-10\-12 06:30:50 CEST 2767 1000 1000 3 present /usr/bin/sleep
.P
.in +4n
.EX
-$ \fBcoredumpctl dump 2955 \-o core\fP
+.RB $ " coredumpctl dump 2955 \-o core" ;
.EE
.in
.P
.P
.in +4n
.EX
-# \fBecho "kernel.core_pattern=core.%p" > \[rs]\fP
-\fB /etc/sysctl.d/50\-coredump.conf\fP
-# \fB/lib/systemd/systemd\-sysctl\fP
+.RB # " echo \[dq]kernel.core_pattern=core.%p\[dq] > \[rs]" ;
+\f[B] /etc/sysctl.d/50\-coredump.conf\f[]
+.RB # " /lib/systemd/systemd\-sysctl" ;
.EE
.in
.P
.P
.in +4n
.EX
-# \fBsysctl \-w kernel.core_pattern="%e\-%s.core"\fP
+.RB # " sysctl \-w kernel.core_pattern=\[dq]%e\-%s.core\[dq]" ;
.EE
.in
.\"
.P
The following statements are recognized; case is insignificant:
.TP
-.B TERM \fIterminal-type\fR
+.BI TERM\~ terminal-type
Starts a terminal-specific section and specifies which terminal it
applies to.
Multiple
.B COLOR yes|all|no|none|tty
(Slackware only; ignored by GNU
.BR dircolors (1).)
-Specifies that colorization should always be enabled (\fIyes\fR or
-\fIall\fR), never enabled (\fIno\fR or \fInone\fR), or enabled only if
-the output is a terminal (\fItty\fR).
-The default is \fIno\fR.
+Specifies that colorization should always be enabled
+.RI ( yes
+or
+.IR all ),
+never enabled
+.IR ( no
+or
+.IR none ),
+or enabled only if the output is a terminal
+.RI ( tty ).
+The default is
+.IR no .
.TP
.B EIGHTBIT yes|no
(Slackware only; ignored by GNU
Specifies that eight-bit ISO/IEC\~8859 characters should be enabled by
default.
For compatibility reasons, this can also be specified as 1 for
-\fIyes\fR or 0 for \fIno\fR.
-The default is \fIno\fR.
+.I yes
+or 0 for
+.IR no .
+The default is
+.IR no .
.TP
-.B OPTIONS \fIoptions\fR
+.BI OPTIONS\~ options
(Slackware only; ignored by GNU
.BR dircolors (1).)
Adds command-line options to the default
.B dircolors
does not verify the validity of these options.
.TP
-.B NORMAL \fIcolor-sequence\fR
+.BI NORMAL\~ color-sequence
Specifies the color used for normal (nonfilename) text.
.IP
Synonym:
.BR NORM .
.TP
-.B FILE \fIcolor-sequence\fR
+.BI FILE\~ color-sequence
Specifies the color used for a regular file.
.TP
-.B DIR \fIcolor-sequence\fR
+.BI DIR\~ color-sequence
Specifies the color used for directories.
.TP
-.B LINK \fIcolor-sequence\fR
+.BI LINK\~ color-sequence
Specifies the color used for a symbolic link.
.IP
Synonyms:
.BR LNK ,
.BR SYMLINK .
.TP
-.B ORPHAN \fIcolor-sequence\fR
+.BI ORPHAN\~ color-sequence
Specifies the color used for an orphaned symbolic link (one which
points to a nonexistent file).
If this is unspecified,
.B LINK
color instead.
.TP
-.B MISSING \fIcolor-sequence\fR
+.BI MISSING\~ color-sequence
Specifies the color used for a missing file (a nonexistent file which
nevertheless has a symbolic link pointing to it).
If this is unspecified,
.B FILE
color instead.
.TP
-.B FIFO \fIcolor-sequence\fR
+.BI FIFO\~ color-sequence
Specifies the color used for a FIFO (named pipe).
.IP
Synonym:
.BR PIPE .
.TP
-.B SOCK \fIcolor-sequence\fR
+.BI SOCK\~ color-sequence
Specifies the color used for a socket.
.TP
-.B DOOR \fIcolor-sequence\fR
+.BI DOOR\~ color-sequence
(Supported since fileutils 4.1)
Specifies the color used for a door (Solaris 2.5 and later).
.TP
-.B BLK \fIcolor-sequence\fR
+.BI BLK\~ color-sequence
Specifies the color used for a block device special file.
.IP
Synonym:
.BR BLOCK .
.TP
-.B CHR \fIcolor-sequence\fR
+.BI CHR\~ color-sequence
Specifies the color used for a character device special file.
.IP
Synonym:
.BR CHAR .
.TP
-.B EXEC \fIcolor-sequence\fR
+.BI EXEC\~ color-sequence
Specifies the color used for a file with the executable attribute set.
.TP
-.B SUID \fIcolor-sequence\fR
+.BI SUID\~ color-sequence
Specifies the color used for a file with the set-user-ID attribute set.
.IP
Synonym:
.BR SETUID .
.TP
-.B SGID \fIcolor-sequence\fR
+.BI SGID\~ color-sequence
Specifies the color used for a file with the set-group-ID attribute set.
.IP
Synonym:
.BR SETGID .
.TP
-.B STICKY \fIcolor-sequence\fR
+.BI STICKY\~ color-sequence
Specifies the color used for a directory with the sticky attribute set.
.TP
-.B STICKY_OTHER_WRITABLE \fIcolor-sequence\fR
+.BI STICKY_OTHER_WRITABLE\~ color-sequence
Specifies the color used for
an other-writable directory with the executable attribute set.
.IP
Synonym:
.BR OWT .
.TP
-.B OTHER_WRITABLE \fIcolor-sequence\fR
+.BI OTHER_WRITABLE\~ color-sequence
Specifies the color used for
an other-writable directory without the executable attribute set.
.IP
Synonym:
.BR OWR .
.TP
-.B LEFTCODE \fIcolor-sequence\fR
+.BI LEFTCODE\~ color-sequence
Specifies the
.I "left code"
for non-ISO/IEC\~6429 terminals (see below).
Synonym:
.BR LEFT .
.TP
-.B RIGHTCODE \fIcolor-sequence\fR
+.BI RIGHTCODE\~ color-sequence
Specifies the
.I "right code"
for non-ISO/IEC\~6429 terminals (see below).
Synonym:
.BR RIGHT .
.TP
-.B ENDCODE \fIcolor-sequence\fR
+.BI ENDCODE\~ color-sequence
Specifies the
.I "end code"
for non-ISO/IEC\~6429 terminals (see below).
Synonym:
.BR END .
.TP
-.BI * "extension color-sequence"
-Specifies the color used for any file that ends in \fIextension\fR.
+.BI * extension\~color-sequence
+Specifies the color used for any file that ends in
+.IR extension .
.TP
-.BI . "extension color-sequence"
-Same as \fB*\fR.\fIextension\fR.
+.BI . extension\~color-sequence
+Same as
+.RI \f[B]*\f[]. extension .
Specifies the color used for any file that
-ends in .\fIextension\fR.
+ends in
+.RI . extension .
Note that the period is included in the
extension, which makes it impossible to specify an extension not
starting with a period, such as
\[rs]t Tab (ASCII 9)
\[rs]v Vertical Tab (ASCII 11)
\[rs]? Delete (ASCII 127)
-\[rs]\fInnn Any character (octal notation)
-\[rs]x\fInnn Any character (hexadecimal notation)
+\[rs]\f[I]nnn\f[] Any character (octal notation)
+\[rs]x\f[I]nnn\f[] Any character (hexadecimal notation)
\[rs]_ Space
\[rs]\[rs] Backslash (\[rs])
\[rs]\[ha] Caret (\[ha])
content.
See the
.B \-\-build\-id
-option to the GNU linker (\fBld\fR (1)) for more details.
+option to the GNU linker
+.RB ( ld (1))
+for more details.
This section is of type
.BR SHT_NOTE .
The only attribute used is
.I struct
definitions below).
Each note is followed by the name field (whose length is defined in
-\fIn_namesz\fR) and then by the descriptor field (whose length is defined in
-\fIn_descsz\fR) and whose starting address has a 4 byte alignment.
+.IR n_namesz )
+and then by the descriptor field (whose length is defined in
+.IR n_descsz )
+and whose starting address has a 4 byte alignment.
Neither field is defined in the note struct due to their arbitrary lengths.
.P
An example for parsing out two consecutive notes should clarify their layout
.RS
.IP [0] 5
OS descriptor
-(\fBELF_NOTE_OS_LINUX\fR, \fBELF_NOTE_OS_GNU\fR, and so on)`
+.RB ( ELF_NOTE_OS_LINUX ,
+.BR ELF_NOTE_OS_GNU ,
+and so on)
.IP [1]
major version of the ABI
.IP [2]
Defaults to unset, which is equivalent to
.BR never .
.TP
-.BR device = \fIblobdev\fP
+.BR device = \f[I]blobdev\f[]
Add extra device holding some of the data.
Must be given as many times and in the same order as
.B \-\-blobdev
.\" Nominally there's a device_table feature and it somehow scans(?) for them,
.\" cf. super.c:erofs_scan_devices(), but I haven't gotten it to work
.TP
-.BR domain_id = \fIdid\fP
+.BR domain_id = \f[I]did\f[]
.TQ
-.BR fsid = \fIid\fP
+.BR fsid = \f[I]id\f[]
Control CacheFiles on-demand read support.
To be documented.
.SH VERSIONS
.P
The keywords currently recognized are:
.TP
-\fBlabel\fR \fInetmask\fR \fIprecedence\fR
+.BI label\~ netmask\~precedence
The value is added to the label table used in the RFC\ 3484 sorting.
-If any \fBlabel\fR definition is present in the configuration file,
+If any
+.B label
+definition is present in the configuration file,
the default table is not used.
All the label definitions
of the default table which are to be maintained have to be duplicated.
Following the keyword,
the line has to contain a network mask and a precedence value.
.TP
-\fBprecedence\fR \fInetmask\fR \fIprecedence\fR
-This keyword is similar to \fBlabel\fR, but instead the value is added
+.BI precedence\~ netmask\~precedence
+This keyword is similar to
+.BR label ,
+but instead the value is added
to the precedence table as specified in RFC\ 3484.
Once again, the
-presence of a single \fBprecedence\fR line in the configuration file
+presence of a single
+.B precedence
+line in the configuration file
causes the default table to not be used.
.TP
-\fBreload\fR <\fByes\fR|\fBno\fR>
+.BR reload\~ < yes | no >
This keyword controls whether a process checks whether the configuration
file has been changed since the last time it was read.
If the value is
-"\fByes\fR", the file is reread.
+.RB \[dq] yes \[dq],
+the file is reread.
This might cause problems in multithreaded
applications and is generally a bad idea.
-The default is "\fBno\fR".
+The default is
+.RB \[dq] no \[dq].
.TP
-\fBscopev4\fR \fImask\fR \fIvalue\fR
+.BI scopev4\~ mask\~value
Add another rule to the RFC\ 3484 scope table for IPv4 address.
By default, the scope IDs described in section 3.2 in RFC\ 3438 are used.
Changing these defaults should hardly ever be necessary.
.SH FILES
-\fI/etc/gai.conf\fR
+.I /etc/gai.conf
.SH VERSIONS
The
.I gai.conf
The file
.I /etc/hosts.equiv
allows or denies hosts and users to use
-the \fBr\fP-commands (e.g.,
+the
+.BR r -commands
+(e.g.,
.BR rlogin ,
.BR rsh ,
or
.P
The file uses the following format:
.TP
-\fI+|[\-]hostname|+@netgroup|\-@netgroup\fP \fI[+|[\-]username|+@netgroup|\-@netgroup]\fP
+.I +|[\-]hostname|+@netgroup|\-@netgroup [+|[\-]username|+@netgroup|\-@netgroup]
.P
The
.I hostname
.I /etc/issue
is a text file which contains a message or
system identification to be printed before the login prompt.
-It may contain various \fB@\fP\fIchar\fP and \fB\[rs]\fP\fIchar\fP
+It may contain various
+.BI @ char
+and
+.BI \[rs] char
sequences, if supported by the
.BR getty -type
program employed on the system.
.P
where the fields are delimited by spaces or tabs.
Empty lines are ignored.
-The hash character (\fB#\fP) indicates the start of a comment:
+The hash character
+.RB ( # )
+indicates the start of a comment:
this character, and the remaining characters up to
the end of the current line,
are ignored by library functions that process the file.
.SH NAME
nologin \- prevent unprivileged users from logging into the system
.SH DESCRIPTION
-If the file \fI/etc/nologin\fP exists and is readable,
+If the file
+.I /etc/nologin
+exists and is readable,
.BR login (1)
will allow access only to root.
Other users will
comment; following characters, up to the end of the line,
are not interpreted by nscd.
.P
-Valid services are \fIpasswd\fP, \fIgroup\fP, \fIhosts\fP, \fIservices\fP,
-or \fInetgroup\fP.
+Valid services are
+.IR passwd ,
+.IR group ,
+.IR hosts ,
+.IR services ,
+or
+.IR netgroup .
.P
.B logfile
.I debug-file-name
.P
The variables currently recognized are:
.TP
-\fBNETID_AUTHORITATIVE =\fR \fITRUE\fR|\fIFALSE\fR
+.RI \f[B]NETID_AUTHORITATIVE\f[]\~=\~ TRUE | FALSE
If set to TRUE, the NIS backend for the
.BR initgroups (3)
function will accept the information
map is large.
The content of the
.I netid.byname
-map is used \fBas is\fR.
+map is used
+.BR "as is" .
The system administrator has to make sure it is correctly generated.
.TP
-\fBSERVICES_AUTHORITATIVE =\fR \fITRUE\fR|\fIFALSE\fR
+.RI \f[B]SERVICES_AUTHORITATIVE\f[]\~=\~ TRUE | FALSE
If set to TRUE, the NIS backend for the
.BR getservbyname (3)
and
primary service names and service aliases.
The system administrator has to make sure it is correctly generated.
.TP
-\fBSETENT_BATCH_READ =\fR \fITRUE\fR|\fIFALSE\fR
+.RI \f[B]SETENT_BATCH_READ\f[]\~=\~ TRUE | FALSE
If set to TRUE, the NIS backend for the
.BR setpwent (3)
and
call might result in a network communication with the server to get
the next entry.
.SH FILES
-\fI/etc/default/nss\fR
+.I /etc/default/nss
.SH EXAMPLES
The default configuration corresponds to the following configuration file:
.P
.\" Ulrich Drepper <drepper@redhat.com>
.\"
.SH SEE ALSO
-\fInsswitch.conf\fR
+.BR nsswitch.conf (5)
.P
Traditionally, there was only a single source for service information,
often in the form of a single configuration
-file (e.g., \fI/etc/passwd\fP).
+file (e.g.,
+.IR /etc/passwd ).
However, as other name services, such as the Network Information
Service (NIS) and the Domain Name Service (DNS), became popular,
a method was needed
.P
If the encrypted password in
.I /etc/passwd
-is "\fI*NP*\fP" (without the quotes),
+is
+.RI \[dq] *NP* \[dq]
+(without the quotes),
the shadow record should be obtained from an NIS+ server.
.P
Regardless of whether shadow passwords are used, many system administrators
.B proc
filesystem supports the following mount options:
.TP
-.BR hidepid= "\fIn\fP (since Linux 3.3)"
+.BR hidepid= "\f[I]n\f[] (since Linux 3.3)"
.\" commit 0499680a42141d86417a8fbaa8c8db806bea1201
This option controls who can access the information in
.IR /proc/ pid
whether another user is running some sensitive program,
whether other users are running any program at all, and so on).
.TP
-.BR gid= "\fIgid\fP (since Linux 3.3)"
+.BR gid= "\f[I]gid\f[] (since Linux 3.3)"
.\" commit 0499680a42141d86417a8fbaa8c8db806bea1201
Specifies the ID of a group whose members are authorized to
learn process information otherwise prohibited by
.P
.in +4n
.EX
-.RB "$" " cat \fIfile\fP | tr \[aq]\[rs]000\[aq] \[aq]\[rs]n\[aq]"
+.RB $ " cat \f[I]file\f[] | tr \[aq]\[rs]000\[aq] \[aq]\[rs]n\[aq]"
.EE
.in
.\" .SH ACKNOWLEDGEMENTS
.I /proc/cpuinfo
This is a collection of CPU and system architecture dependent items,
for each supported architecture a different list.
-Two common entries are \fIprocessor\fP which gives CPU number and
-\fIbogomips\fP; a system constant that is calculated
+Two common entries are
+.I processor
+which gives CPU number and
+.IR bogomips ;
+a system constant that is calculated
during kernel initialization.
SMP machines have information for
each CPU.
.SH DESCRIPTION
.TP
.I /proc/dma
-This is a list of the registered \fIISA\fP DMA (direct memory access)
+This is a list of the registered
+.I ISA
+DMA (direct memory access)
channels in use.
.SH SEE ALSO
.BR proc (5)
.TP
.IR Unevictable " %lu (since Linux 2.6.28)"
(From Linux 2.6.28 to Linux 2.6.30,
-\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
+.B CONFIG_UNEVICTABLE_LRU
+was required.)
[To be documented.]
.TP
.IR Mlocked " %lu (since Linux 2.6.28)"
(From Linux 2.6.28 to Linux 2.6.30,
-\fBCONFIG_UNEVICTABLE_LRU\fP was required.)
+.B CONFIG_UNEVICTABLE_LRU
+was required.)
[To be documented.]
.TP
.IR HighTotal " %lu"
-(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
+(Starting with Linux 2.6.19,
+.B CONFIG_HIGHMEM
+is required.)
Total amount of highmem.
Highmem is all memory above \[ti]860 MB of physical memory.
Highmem areas are for use by user-space programs,
this memory, making it slower to access than lowmem.
.TP
.IR HighFree " %lu"
-(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
+(Starting with Linux 2.6.19,
+.B CONFIG_HIGHMEM
+is required.)
Amount of free highmem.
.TP
.IR LowTotal " %lu"
-(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
+(Starting with Linux 2.6.19,
+.B CONFIG_HIGHMEM
+is required.)
Total amount of lowmem.
Lowmem is memory which can be used for everything that
highmem can be used for, but it is also available for the
Bad things happen when you're out of lowmem.
.TP
.IR LowFree " %lu"
-(Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
+(Starting with Linux 2.6.19,
+.B CONFIG_HIGHMEM
+is required.)
Amount of free lowmem.
.TP
.IR MmapCopy " %lu (since Linux 2.6.29)"
Amount of memory dedicated to the lowest level of page tables.
.TP
.IR Quicklists " %lu (since Linux 2.6.27)"
-(\fBCONFIG_QUICKLIST\fP is required.)
+.RB ( CONFIG_QUICKLIST
+is required.)
[To be documented.]
.TP
.IR NFS_Unstable " %lu (since Linux 2.6.18)"
.IR /proc/vmallocinfo .
.TP
.IR HardwareCorrupted " %lu (since Linux 2.6.32)"
-(\fBCONFIG_MEMORY_FAILURE\fP is required.)
+.RB ( CONFIG_MEMORY_FAILURE
+is required.)
[To be documented.]
.TP
.IR LazyFree " %lu (since Linux 4.12)"
.BR MADV_FREE .
.TP
.IR AnonHugePages " %lu (since Linux 2.6.38)"
-(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
+.RB ( CONFIG_TRANSPARENT_HUGEPAGE
+is required.)
Non-file backed huge pages mapped into user-space page tables.
.TP
.IR ShmemHugePages " %lu (since Linux 4.8)"
-(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
+.RB ( CONFIG_TRANSPARENT_HUGEPAGE
+is required.)
Memory used by shared memory (shmem) and
.BR tmpfs (5)
allocated with huge pages.
.TP
.IR ShmemPmdMapped " %lu (since Linux 4.8)"
-(\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
+.RB ( CONFIG_TRANSPARENT_HUGEPAGE
+is required.)
Shared memory mapped into user space with huge pages.
.TP
.IR CmaTotal " %lu (since Linux 3.1)"
Total CMA (Contiguous Memory Allocator) pages.
-(\fBCONFIG_CMA\fP is required.)
+.RB ( CONFIG_CMA
+is required.)
.TP
.IR CmaFree " %lu (since Linux 3.1)"
Free CMA (Contiguous Memory Allocator) pages.
-(\fBCONFIG_CMA\fP is required.)
+.RB ( CONFIG_CMA
+is required.)
.TP
.IR HugePages_Total " %lu"
-(\fBCONFIG_HUGETLB_PAGE\fP is required.)
+.RB ( CONFIG_HUGETLB_PAGE
+is required.)
The size of the pool of huge pages.
.TP
.IR HugePages_Free " %lu"
-(\fBCONFIG_HUGETLB_PAGE\fP is required.)
+.RB ( CONFIG_HUGETLB_PAGE
+is required.)
The number of huge pages in the pool that are not yet allocated.
.TP
.IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
-(\fBCONFIG_HUGETLB_PAGE\fP is required.)
+.RB ( CONFIG_HUGETLB_PAGE
+is required.)
This is the number of huge pages for
which a commitment to allocate from the pool has been made,
but no allocation has yet been made.
huge page from the pool of huge pages at fault time.
.TP
.IR HugePages_Surp " %lu (since Linux 2.6.24)"
-(\fBCONFIG_HUGETLB_PAGE\fP is required.)
+.RB ( CONFIG_HUGETLB_PAGE
+is required.)
This is the number of huge pages in
the pool above the value in
.IR /proc/sys/vm/nr_hugepages .
.IR /proc/sys/vm/nr_overcommit_hugepages .
.TP
.IR Hugepagesize " %lu"
-(\fBCONFIG_HUGETLB_PAGE\fP is required.)
+.RB ( CONFIG_HUGETLB_PAGE
+is required.)
The size of huge pages.
.TP
.IR DirectMap4k " %lu (since Linux 2.6.27)"
.\" Precisely: Linux 2.6.0-test7
This contains the contents of the ELF interpreter information passed
to the process at exec time.
-The format is one \fIunsigned long\fP ID
-plus one \fIunsigned long\fP value for each entry.
+The format is one
+.I unsigned long
+ID
+plus one
+.I unsigned long
+value for each entry.
The last entry contains two zeros.
See also
.BR getauxval (3).
.IP
.in +4n
.EX
-$ \fBPS1=\[aq]sh1# \[aq] unshare \-Urnm\fP
-sh1# \fBmount \-t tmpfs tmpfs /etc\fP # Mount empty tmpfs at /etc
-sh1# \fBmount \-\-bind /usr /dev\fP # Mount /usr at /dev
-sh1# \fBecho $$\fP
+.RB $ " PS1=\[aq]sh1# \[aq] unshare \-Urnm" ;
+.RB sh1# " mount \-t tmpfs tmpfs /etc" "; # Mount empty tmpfs at /etc"
+.RB sh1# " mount \-\-bind /usr /dev" "; # Mount /usr at /dev"
+.RB sh1# " echo $$" ;
27123
.EE
.in
.IP
.in +4n
.EX
-$ \fBPS1=\[aq]sh2# \[aq] sudo sh\fP
-sh2# \fBls /etc | wc \-l\fP # In initial NS
+.RB $ " PS1=\[aq]sh2# \[aq] sudo sh" ;
+.RB sh2# " ls /etc | wc \-l" "; # In initial NS"
309
-sh2# \fBls /proc/27123/root/etc | wc \-l\fP # /etc in other NS
+.RB sh2# " ls /proc/27123/root/etc | wc \-l" "; # /etc in other NS"
0 # The empty tmpfs dir
-sh2# \fBls /dev | wc \-l\fP # In initial NS
+.RB sh2# " ls /dev | wc \-l" "; # In initial NS"
205
-sh2# \fBls /proc/27123/root/dev | wc \-l\fP # /dev in other NS
+.RB sh2# " ls /proc/27123/root/dev | wc \-l" "; # /dev in other NS"
11 # Actually bind
# mounted to /usr
-sh2# \fBls /usr | wc \-l\fP # /usr in initial NS
+.RB sh2# " ls /usr | wc \-l" "; # /usr in initial NS"
11
.EE
.in
The affected fields are indicated with the marking [PT].
.RS
.TP
-(1) \fIpid\fP \ %d
+.RI (1)\~ pid \~%d
.br
The process ID.
.TP
-(2) \fIcomm\fP \ %s
+.RI (2)\~ comm \~%s
The filename of the executable, in parentheses.
Strings longer than
.B TASK_COMM_LEN
(16) characters (including the terminating null byte) are silently truncated.
This is visible whether or not the executable is swapped out.
.TP
-(3) \fIstate\fP \ %c
+.RI (3)\~ state \~%c
One of the following characters, indicating process state:
.RS
.TP
Idle (Linux 4.14 onward)
.RE
.TP
-(4) \fIppid\fP \ %d
+.RI (4)\~ ppid \~%d
The PID of the parent of this process.
.TP
-(5) \fIpgrp\fP \ %d
+.RI (5)\~ pgrp \~%d
The process group ID of the process.
.TP
-(6) \fIsession\fP \ %d
+.RI (6)\~ session \~%d
The session ID of the process.
.TP
-(7) \fItty_nr\fP \ %d
+.RI (7)\~ tty_nr \~%d
The controlling terminal of the process.
(The minor device number is contained in the combination of bits
31 to 20 and 7 to 0;
the major device number is in bits 15 to 8.)
.TP
-(8) \fItpgid\fP \ %d
+.RI (8)\~ tpgid \~%d
.\" This field and following, up to and including wchan added 0.99.1
The ID of the foreground process group of the controlling
terminal of the process.
.TP
-(9) \fIflags\fP \ %u
+.RI (9)\~ flags \~%u
The kernel flags word of the process.
For bit meanings,
see the PF_* defines in the Linux kernel source file
.IP
The format for this field was %lu before Linux 2.6.
.TP
-(10) \fIminflt\fP \ %lu
+.RI (10)\~ minflt \~%lu
The number of minor faults the process has made which have not
required loading a memory page from disk.
.TP
-(11) \fIcminflt\fP \ %lu
+.RI (11)\~ cminflt \~%lu
The number of minor faults that the process's
waited-for children have made.
.TP
-(12) \fImajflt\fP \ %lu
+.RI (12)\~ majflt \~%lu
The number of major faults the process has made which have
required loading a memory page from disk.
.TP
-(13) \fIcmajflt\fP \ %lu
+.RI (13)\~ cmajflt \~%lu
The number of major faults that the process's
waited-for children have made.
.TP
-(14) \fIutime\fP \ %lu
+.RI (14)\~ utime \~%lu
Amount of time that this process has been scheduled in user mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
-This includes guest time, \fIguest_time\fP
+This includes guest time,
+.I guest_time
(time spent running a virtual CPU, see below),
so that applications that are not aware of the guest time field
do not lose that time from their calculations.
.TP
-(15) \fIstime\fP \ %lu
+.RI (15)\~ stime \~%lu
Amount of time that this process has been scheduled in kernel mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
-(16) \fIcutime\fP \ %ld
+.RI (16)\~ cutime \~%ld
Amount of time that this process's
waited-for children have been scheduled in user mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
(See also
.BR times (2).)
-This includes guest time, \fIcguest_time\fP
+This includes guest time,
+.I cguest_time
(time spent running a virtual CPU, see below).
.TP
-(17) \fIcstime\fP \ %ld
+.RI (17)\~ cstime \~%ld
Amount of time that this process's
waited-for children have been scheduled in kernel mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
-(18) \fIpriority\fP \ %ld
+.RI (18)\~ priority \~%ld
(Explanation for Linux 2.6)
For processes running a real-time scheduling policy
.RI ( policy
the scheduler weighting given to this process.
.\" And back in Linux 1.2 days things were different again.
.TP
-(19) \fInice\fP \ %ld
+.RI (19)\~ nice \~%ld
The nice value (see
.BR setpriority (2)),
a value in the range 19 (low priority) to \-20 (high priority).
.\" Back in Linux 1.2 days things were different.
.\" .TP
-.\" \fIcounter\fP %ld
+.\" .IR counter \~%ld
.\" The current maximum size in jiffies of the process's next timeslice,
.\" or what is currently left of its current timeslice, if it is the
.\" currently running process.
.\" .TP
-.\" \fItimeout\fP %u
+.\" .IR timeout \~%u
.\" The time in jiffies of the process's next timeout.
.\" timeout was removed sometime around 2.1/2.2
.TP
-(20) \fInum_threads\fP \ %ld
+.RI (20)\~ num_threads \~%ld
Number of threads in this process (since Linux 2.6).
Before Linux 2.6, this field was hard coded to 0 as a placeholder
for an earlier removed field.
.TP
-(21) \fIitrealvalue\fP \ %ld
+.RI (21)\~ itrealvalue \~%ld
The time in jiffies before the next
.B SIGALRM
is sent to the process due to an interval timer.
Since Linux 2.6.17, this field is no longer maintained,
and is hard coded as 0.
.TP
-(22) \fIstarttime\fP \ %llu
+.RI (22)\~ starttime \~%llu
The time the process started after system boot.
Before Linux 2.6, this value was expressed in jiffies.
Since Linux 2.6, the value is expressed in clock ticks (divide by
.IP
The format for this field was %lu before Linux 2.6.
.TP
-(23) \fIvsize\fP \ %lu
+.RI (23)\~ vsize \~%lu
Virtual memory size in bytes.
.TP
-(24) \fIrss\fP \ %ld
+.RI (24)\~ rss \~%ld
Resident Set Size: number of pages the process has in real memory.
This is just the pages which
count toward text, data, or stack space.
.IR /proc/ pid /statm
below.
.TP
-(25) \fIrsslim\fP \ %lu
+.RI (25)\~ rsslim \~%lu
Current soft limit in bytes on the rss of the process;
see the description of
.B RLIMIT_RSS
in
.BR getrlimit (2).
.TP
-(26) \fIstartcode\fP \ %lu \ [PT]
+.RI (26)\~ startcode \~%lu\~[PT]
The address above which program text can run.
.TP
-(27) \fIendcode\fP \ %lu \ [PT]
+.RI (27)\~ endcode \~%lu\~[PT]
The address below which program text can run.
.TP
-(28) \fIstartstack\fP \ %lu \ [PT]
+.RI (28)\~ startstack %lu\~[PT]
The address of the start (i.e., bottom) of the stack.
.TP
-(29) \fIkstkesp\fP \ %lu \ [PT]
+.RI (29)\~ kstkesp \~%lu\~[PT]
The current value of ESP (stack pointer), as found in the
kernel stack page for the process.
.TP
-(30) \fIkstkeip\fP \ %lu \ [PT]
+.RI (30)\~ kstkeip \~%lu\~[PT]
The current EIP (instruction pointer).
.TP
-(31) \fIsignal\fP \ %lu
+.RI (31)\~ signal \~%lu
The bitmap of pending signals, displayed as a decimal number.
Obsolete, because it does not provide information on real-time signals; use
.IR /proc/ pid /status
instead.
.TP
-(32) \fIblocked\fP \ %lu
+.RI (32)\~ blocked \~%lu
The bitmap of blocked signals, displayed as a decimal number.
Obsolete, because it does not provide information on real-time signals; use
.IR /proc/ pid /status
instead.
.TP
-(33) \fIsigignore\fP \ %lu
+.RI (33)\~ sigignore \~%lu
The bitmap of ignored signals, displayed as a decimal number.
Obsolete, because it does not provide information on real-time signals; use
.IR /proc/ pid /status
instead.
.TP
-(34) \fIsigcatch\fP \ %lu
+.RI (34)\~ sigcatch \~%lu
The bitmap of caught signals, displayed as a decimal number.
Obsolete, because it does not provide information on real-time signals; use
.IR /proc/ pid /status
instead.
.TP
-(35) \fIwchan\fP \ %lu \ [PT]
+.RI (35)\~ wchan \~%lu\~[PT]
This is the "channel" in which the process is waiting.
It is the address of a location in the kernel where the process is sleeping.
The corresponding symbolic name can be found in
.IR /proc/ pid /wchan .
.TP
-(36) \fInswap\fP \ %lu
+.RI (36)\~ nswap \~%lu
.\" nswap was added in Linux 2.0
Number of pages swapped (not maintained).
.TP
-(37) \fIcnswap\fP \ %lu
+.RI (37)\~ cnswap \~%lu
.\" cnswap was added in Linux 2.0
-Cumulative \fInswap\fP for child processes (not maintained).
+Cumulative nswap for child processes (not maintained).
.TP
-(38) \fIexit_signal\fP \ %d \ (since Linux 2.1.22)
+.RI (38)\~ exit_signal "\~%d (since Linux 2.1.22)"
Signal to be sent to parent when we die.
.TP
-(39) \fIprocessor\fP \ %d \ (since Linux 2.2.8)
+.RI (39)\~ processor "\~%d (since Linux 2.2.8)"
CPU number last executed on.
.TP
-(40) \fIrt_priority\fP \ %u \ (since Linux 2.5.19)
+.RI (40)\~ rt_priority "\~%u (since Linux 2.5.19)"
Real-time scheduling priority, a number in the range 1 to 99 for
processes scheduled under a real-time policy,
or 0, for non-real-time processes (see
.BR sched_setscheduler (2)).
.TP
-(41) \fIpolicy\fP \ %u \ (since Linux 2.5.19)
+.RI (41)\~ policy "\~%u (since Linux 2.5.19)"
Scheduling policy (see
.BR sched_setscheduler (2)).
Decode using the SCHED_* constants in
.IP
The format for this field was %lu before Linux 2.6.22.
.TP
-(42) \fIdelayacct_blkio_ticks\fP \ %llu \ (since Linux 2.6.18)
+.RI (42)\~ delayacct_blkio_ticks "\~%llu (since Linux 2.6.18)"
Aggregated block I/O delays, measured in clock ticks (centiseconds).
.TP
-(43) \fIguest_time\fP \ %lu \ (since Linux 2.6.24)
+.RI (43)\~ guest_time "\~%lu (since Linux 2.6.24)"
Guest time of the process (time spent running a virtual CPU
for a guest operating system), measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
-(44) \fIcguest_time\fP \ %ld \ (since Linux 2.6.24)
+.RI (44)\~ cguest_time "\~%ld (since Linux 2.6.24)"
Guest time of the process's children, measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
-(45) \fIstart_data\fP \ %lu \ (since Linux 3.3) \ [PT]
+.RI (45)\~ start_data "\~%lu (since Linux 3.3) [PT]"
.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
Address above which program initialized and
uninitialized (BSS) data are placed.
.TP
-(46) \fIend_data\fP \ %lu \ (since Linux 3.3) \ [PT]
+.RI (46)\~ end_data "\~%lu (since Linux 3.3) [PT]"
.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
Address below which program initialized and
uninitialized (BSS) data are placed.
.TP
-(47) \fIstart_brk\fP \ %lu \ (since Linux 3.3) \ [PT]
+.RI (47)\~ start_brk "\~%lu (since Linux 3.3) [PT]"
.\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
Address above which program heap can be expanded with
.BR brk (2).
.TP
-(48) \fIarg_start\fP \ %lu \ (since Linux 3.5) \ [PT]
+.RI (48)\~ arg_start "\~%lu (since Linux 3.5) [PT]"
.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
Address above which program command-line arguments
.RI ( argv )
are placed.
.TP
-(49) \fIarg_end\fP \ %lu \ (since Linux 3.5) \ [PT]
+.RI (49)\~ arg_end "\~%lu (since Linux 3.5) [PT]"
.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
Address below program command-line arguments
.RI ( argv )
are placed.
.TP
-(50) \fIenv_start\fP \ %lu \ (since Linux 3.5) \ [PT]
+.RI (50)\~ env_start "\~%lu (since Linux 3.5) [PT]"
.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
Address above which program environment is placed.
.TP
-(51) \fIenv_end\fP \ %lu \ (since Linux 3.5) \ [PT]
+.RI (51)\~ env_end "\~%lu (since Linux 3.5) [PT]"
.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
Address below which program environment is placed.
.TP
-(52) \fIexit_code\fP \ %d \ (since Linux 3.5) \ [PT]
+.RI (52)\~ exit_code "\~%d (since Linux 3.5) [PT]"
.\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
The thread's exit status in the form reported by
.BR waitpid (2).
.in +4n
.EX
size (1) total program size
- (same as VmSize in \fI/proc/\fPpid\fI/status\fP)
+ (same as VmSize in \f[I]/proc/\f[]pid\f[I]/status\f[])
resident (2) resident set size
- (inaccurate; same as VmRSS in \fI/proc/\fPpid\fI/status\fP)
+ (inaccurate; same as VmRSS in \f[I]/proc/\f[]pid\f[I]/status\f[])
shared (3) number of resident shared pages
(i.e., backed by a file)
(inaccurate; same as RssFile+RssShmem in
- \fI/proc/\fPpid\fI/status\fP)
+ \f[I]/proc/\f[]pid\f[I]/status\f[])
text (4) text (code)
.\" (not including libs; broken, includes data segment)
lib (5) library (unused since Linux 2.6; always 0)
.I /proc/scsi/scsi
This is a listing of all SCSI devices known to the kernel.
The listing is similar to the one seen during bootup.
-scsi currently supports only the \fIadd\-single\-device\fP command which
+scsi currently supports only the
+.I add\-single\-device
+command which
allows root to add a hotplugged device to the list of known devices.
.IP
The command
error will be returned.
.TP
.IR /proc/scsi/ drivername /
-\fIdrivername\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740,
+.I drivername
+can currently be NCR53c7xx, aha152x, aha1542, aha1740,
aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic,
scsi_debug, seagate, t128, u15\-24f, ultrastore, or wd7000.
These directories show up for all drivers that registered at least one
statistics, and so on.
.IP
Writing to these files allows different things on different hosts.
-For example, with the \fIlatency\fP and \fInolatency\fP commands,
+For example, with the
+.I latency
+and
+.I nolatency
+commands,
root can switch on and off command latency measurement code in the
eata_dma driver.
-With the \fIlockup\fP and \fIunlock\fP commands,
+With the
+.I lockup
+and
+.I unlock
+commands,
root can control bus lockups simulated by the scsi_debug driver.
.SH SEE ALSO
.BR proc (5)
.I sysconf(_SC_CLK_TCK)
to obtain the right value),
.\" 1024 on Alpha and ia64
-that the system ("cpu" line) or the specific CPU ("cpu\fIN\fR" line)
+that the system ("cpu" line) or the specific CPU
+.RI (\[dq]cpu N \[dq]
+line)
spent in various states:
.RS
.TP
operating systems under the control of the Linux kernel).
.RE
.TP
-\fIpage 5741 1808\fP
+.I page 5741 1808
The number of pages the system paged in and the number that were paged
out (from disk).
.TP
-\fIswap 1 0\fP
+.I swap 1 0
The number of swap pages that have been brought in and out.
.TP
.\" FIXME . The following is not the full picture for the 'intr' of
.\" /proc/stat on 2.6:
-\fIintr 1462898\fP
+.I intr 1462898
This line shows counts of interrupts serviced since boot time,
for each of the possible system interrupts.
The first column is the total of all interrupts serviced
each subsequent column is the total for that particular numbered interrupt.
Unnumbered interrupts are not shown, only summed into the total.
.TP
-\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
+.IR "disk_io: (2,0):(31,30,5764,1,2) (3,0):" ...
(major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
.br
(Linux 2.4 only)
.TP
-\fIctxt 115315\fP
+.I ctxt 115315
The number of context switches that the system underwent.
.TP
-\fIbtime 769041601\fP
+.I btime 769041601
boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
.TP
-\fIprocesses 86031\fP
+.I processes 86031
Number of forks since boot.
.TP
-\fIprocs_running 6\fP
+.I procs_running 6
Number of processes in runnable state.
(Linux 2.5.45 onward.)
.TP
-\fIprocs_blocked 2\fP
+.I procs_blocked 2
Number of processes blocked waiting for I/O to complete.
(Linux 2.5.45 onward.)
.TP
This directory (present since Linux 1.3.57) contains a number of files
and subdirectories corresponding to kernel variables.
These variables can be read and in some cases modified using
-the \fI/proc\fP filesystem, and the (deprecated)
+the
+.I /proc
+filesystem, and the (deprecated)
.BR sysctl (2)
system call.
.IP
This value should be 3\[en]4 times larger
than the value in
.IR file\-max ,
-since \fIstdin\fP, \fIstdout\fP
+since
+.IR stdin ,
+.I stdout
and network sockets also need an inode to handle them.
When you regularly run out of inodes, you need to increase this value.
.IP
Three different integer values can be specified:
.RS
.TP
-\fI0\ (default)\fP
+.I 0 (default)
.\" In kernel source: SUID_DUMP_DISABLE
This provides the traditional (pre-Linux 2.6.13) behavior.
A core dump will not be produced for a process which has
or similar, or by executing a set-user-ID or set-group-ID program)
or whose binary does not have read permission enabled.
.TP
-\fI1\ ("debug")\fP
+.I 1 (\[dq]debug\[dq])
.\" In kernel source: SUID_DUMP_USER
All processes dump core when possible.
(Reasons why a process might nevertheless not dump core are described in
this mode is insecure because it allows unprivileged users to
examine the memory contents of privileged processes.
.TP
-\fI2\ ("suidsafe")\fP
+.I 2 (\[dq]suidsafe\[dq])
.\" In kernel source: SUID_DUMP_ROOT
Any binary which normally would not be dumped (see "0" above)
is dumped readable by root only.
.P
The different configuration options are:
.TP
-\fBnameserver\fP Name server IP address
+.BR nameserver " Name server IP address"
Internet address of a name server that the resolver should query,
either an IPv4 address (in dot notation),
or an IPv6 address in colon (and possibly dot) notation as per RFC 2373.
Up to
.B MAXNS
-(currently 3, see \fI<resolv.h>\fP) name servers may be listed,
+(currently 3, see
+.IR <resolv.h> )
+name servers may be listed,
one per keyword.
If there are multiple servers,
the resolver library queries them in the order listed.
-If no \fBnameserver\fP entries are present,
+If no
+.B nameserver
+entries are present,
the default is to use the name server on the local machine.
(The algorithm used is to try a name server, and if the query times out,
try the next, until out of name servers,
then repeat trying all the name servers
until a maximum number of retries are made.)
.TP
-\fBsearch\fP Search list for host-name lookup.
+.BR search " Search list for host-name lookup."
By default, the search list contains one entry, the local domain name.
It is determined from the local hostname returned by
.BR gethostname (2);
root domain is assumed as the local domain name.
.IP
This may be changed by listing the desired domain search path
-following the \fIsearch\fP keyword with spaces or tabs separating
+following the
+.I search
+keyword with spaces or tabs separating
the names.
Resolver queries having fewer than
.I ndots
.B search
directive that handles one search list entry only.
.TP
-\fBsortlist\fP
+.B sortlist
This option allows addresses returned by
.BR gethostbyname (3)
to be sorted.
sortlist 130.155.160.0/255.255.240.0 130.155.0.0
.in
.TP
-\fBoptions\fP
+.B options
Options allows certain internal resolver variables to be modified.
The syntax is
.RS
.IP
-\fBoptions\fP \fIoption\fP \fI...\fP
+.BI options \~option\~...
.P
-where \fIoption\fP is one of the following:
+where
+.I option
+is one of the following:
.TP
-\fBdebug\fP
+.B debug
.\" Since glibc 2.2?
Sets
.B RES_DEBUG
.BR res_query (3)
(see
.BR resolver (3))
-before an \fIinitial absolute query\fP will be made.
+before an
+.I initial absolute query
+will be made.
The default for
-\fIn\fP is 1, meaning that if there are any dots in a name, the name
-will be tried first as an absolute name before any \fIsearch list\fP
+.I n
+is 1, meaning that if there are any dots in a name, the name
+will be tried first as an absolute name before any
+.I search list
elements are appended to it.
The value for this option is silently capped to 15.
.TP
Measured in seconds,
the default is
.B RES_TIMEOUT
-(currently 5, see \fI<resolv.h>\fP).
+(currently 5, see
+.IR <resolv.h> ).
The value for this option is silently capped to 30.
.TP
.BI attempts: n
an error to the calling application.
The default is
.B RES_DFLRETRY
-(currently 2, see \fI<resolv.h>\fP).
+(currently 2, see
+.IR <resolv.h> ).
The value for this option is silently capped to 5.
.TP
.B rotate
and is passed through unchanged to applications in responses.
.RE
.P
-The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be
+The
+.I search
+keyword of a system's
+.I resolv.conf
+file can be
overridden on a per-process basis by setting the environment variable
.B LOCALDOMAIN
to a space-separated list of search domains.
.P
-The \fIoptions\fP keyword of a system's \fIresolv.conf\fP file can be
+The
+.I options
+keyword of a system's
+.I resolv.conf
+file can be
amended on a per-process basis by setting the environment variable
.B RES_OPTIONS
to a space-separated list of resolver options
-as explained above under \fBoptions\fP.
+as explained above under
+.BR options .
.P
The keyword and value must appear on a single line, and the keyword
-(e.g., \fBnameserver\fP) must start the line.
+(e.g.,
+.BR nameserver )
+must start the line.
The value follows the keyword, separated by white space.
.P
Lines that contain a semicolon (;) or hash character (#)
contents of this file:
.P
.EX
-$ \fBsudo cat /proc/slabinfo\fP
+.RB $ " sudo cat /proc/slabinfo" ;
slabinfo \- version: 2.1
# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> ...
sigqueue 100 100 160 25 1 : tunables 0 0 0 : slabdata 4 4 0
.P
.in +4n
.EX
-# \fBecho \[aq]name limit batchcount sharedfactor\[aq] > /proc/slabinfo\fP
+.RB # " echo \[aq]name limit batchcount sharedfactor\[aq] > /proc/slabinfo" ;
.EE
.in
.P
.IP
.in +4n
.EX
-$ \fBstat \-c "%t %T" /dev/null\fP
+.RB $ " stat \-c \[dq]%t %T\[dq] /dev/null" ;
1 3
-$ \fBreadlink /sys/dev/char/1\[rs]:3\fP
+.RB $ " readlink /sys/dev/char/1\[rs]:3" ;
\&../../devices/virtual/mem/null
-$ \fBls \-Fd /sys/devices/virtual/mem/null\fP
+.RB $ " ls \-Fd /sys/devices/virtual/mem/null" ;
/sys/devices/virtual/mem/null/
-$ \fBls \-d1 /sys/devices/virtual/mem/null/*\fP
+.RB $ " ls \-d1 /sys/devices/virtual/mem/null/*" ;
/sys/devices/virtual/mem/null/dev
/sys/devices/virtual/mem/null/power/
/sys/devices/virtual/mem/null/subsystem@
nx No padding, must use XON/XOFF
os Terminal can overstrike
ul Terminal underlines although it can not overstrike
-xb Beehive glitch, f1 sends ESCAPE, f2 sends \fB\[ha]C\fP
+xb Beehive glitch, f1 sends ESCAPE, f2 sends \f[B]\[ha]C\f[]
xn Newline/wraparound glitch
xo Terminal uses xon/xoff protocol
xs Text typed over standout text will be displayed in standout
ac Pairs of block graphic characters to map alternate character set
ae End alternative character set
as Start alternative character set for block graphic characters
-bc Backspace, if not \fB\[ha]H\fP
+bc Backspace, if not \f[B]\[ha]H\f[]
bl Audio bell
bt Move to previous tab stop
cb Clear from beginning of line to cursor
vi Cursor invisible
vs Standout cursor
wi Set window from line %1 to %2 and column %3 to %4
-XF XOFF character if not \fB\[ha]S\fP
+XF XOFF character if not \f[B]\[ha]S\f[]
.fi
.P
There are several ways of defining the control codes for string capabilities:
Every normal character represents itself,
except \[aq]\[ha]\[aq], \[aq]\[rs]\[aq], and \[aq]%\[aq].
.P
-A \fB\[ha]x\fP means Control-x.
+A \f[B]\[ha]x\f[] means Control-x.
Control-A equals 1 decimal.
.P
\[rs]x means a special code.
.B tmpfs
filesystem supports the following mount options:
.TP
-.BR size "=\fIbytes\fP"
+.BR size =\f[I]bytes\f[]
Specify an upper limit on the size of the filesystem.
The size is given in bytes, and rounded up to entire pages.
The limit is removed if the size is
is specified, is
.IR size=50% .
.TP
-.BR nr_blocks "=\fIblocks\fP"
+.BR nr_blocks =\f[I]blocks\f[]
The same as
.BR size ,
but in blocks of
.BR size ,
but not a % suffix.
.TP
-.BR nr_inodes "=\fIinodes\fP"
+.BR nr_inodes =\f[I]inodes\f[]
The maximum number of inodes for this instance.
The default is half of the number of your physical RAM pages, or (on a
machine with highmem) the number of lowmem RAM pages, whichever is smaller.
Remounts must respect the original settings.
By default swap is enabled.
.TP
-.BR mode "=\fImode\fP"
+.BR mode =\f[I]mode\f[]
Set initial permissions of the root directory.
.TP
-.BR gid "=\fIgid\fP (since Linux 2.5.7)"
+.BR gid "=\f[I]gid\f[] (since Linux 2.5.7)"
.\" Technically this is also in some version of Linux 2.4.
.\" commit 099445b489625b80b1d6687c9b6072dbeaca4096
Set the initial group ID of the root directory.
.TP
-.BR uid "=\fIuid\fP (since Linux 2.5.7)"
+.BR uid "=\f[I]uid\f[] (since Linux 2.5.7)"
.\" Technically this is also in some version of Linux 2.4.
.\" commit 099445b489625b80b1d6687c9b6072dbeaca4096
Set the initial user ID of the root directory.
.TP
-.BR huge "=\fIhuge_option\fR (since Linux 4.7.0)"
+.BR huge "=\f[I]huge_option\f[] (since Linux 4.7.0)"
.\" commit 5a6e75f8110c97e2a5488894d4e922187e6cb343
Set the huge table memory allocation policy for all files in this instance (if
.B CONFIG_TRANSPARENT_HUGEPAGE
Force the huge option on for all mounts; useful for testing.
.RE
.TP
-.BR mpol "=\fImpol_option\fR (since Linux 2.6.15)"
+.BR mpol "=\f[I]mpol_option\f[] (since Linux 2.6.15)"
.\" commit 7339ff8302fd70aabf5f1ae26e0c4905fa74a495
Set the NUMA memory allocation policy for all files in this instance (if
.B CONFIG_NUMA
Use the process allocation policy (see
.BR set_mempolicy (2)).
.TP
-.BR prefer ":\fInode\fP"
+.BR prefer :\f[I]node\f[]
Preferably allocate memory from the given
.IR node .
.TP
-.BR bind ":\fInodelist\fP"
+.BR bind :\f[I]nodelist\f[]
Allocate memory only from nodes in
.IR nodelist .
.TP
.B interleave
Allocate from each node in turn.
.TP
-.BR interleave ":\fInodelist\fP"
+.BR interleave :\f[I]nodelist\f[]
Allocate from each node of
.I in
turn.
\c
.BR init (1))\ \c
*/
-#define BOOT_TIME 2 /* Time of system boot (in \fIut_tv\fP) */
+#define BOOT_TIME 2 /* Time of system boot (in \f[I]ut_tv\f[]) */
#define NEW_TIME 3 /* Time after system clock change
- (in \fIut_tv\fP) */
+ (in \f[I]ut_tv\f[]) */
#define OLD_TIME 4 /* Time before system clock change
- (in \fIut_tv\fP) */
+ (in \f[I]ut_tv\f[]) */
#define INIT_PROCESS 5 /* Process spawned by \c
.BR init (1)\ \c
*/
.BR inittab (5).
Before an entry is processed, though,
.BR init (1)
-cleans up utmp by setting \fIut_type\fP to \fBDEAD_PROCESS\fP, clearing
-\fIut_user\fP, \fIut_host\fP, and \fIut_time\fP with null bytes for each
-record which \fIut_type\fP is not \fBDEAD_PROCESS\fP or \fBRUN_LVL\fP
-and where no process with PID \fIut_pid\fP exists.
+cleans up utmp by setting
+.I ut_type
+to
+.BR DEAD_PROCESS ,
+clearing
+.IR ut_user ,
+.IR ut_host ,
+and
+.I ut_time
+with null bytes for each
+record which
+.I ut_type
+is not
+.B DEAD_PROCESS
+or
+.B RUN_LVL
+and where no process with PID
+.I ut_pid
+exists.
If no empty record
-with the needed \fIut_id\fP can be found,
+with the needed
+.I ut_id
+can be found,
.BR init (1)
creates a new one.
-It sets \fIut_id\fP from the inittab, \fIut_pid\fP and \fIut_time\fP to the
-current values, and \fIut_type\fP to \fBINIT_PROCESS\fP.
+It sets
+.I ut_id
+from the inittab,
+.I ut_pid
+and
+.I ut_time
+to the current values,
+and
+.I ut_type
+to
+.BR INIT_PROCESS .
.P
.BR mingetty (8)
(or
.BR agetty (8))
-locates the entry by the PID, changes \fIut_type\fP to
-\fBLOGIN_PROCESS\fP, changes \fIut_time\fP, sets \fIut_line\fP, and waits
+locates the entry by the PID, changes
+.I ut_type
+to
+.BR LOGIN_PROCESS ,
+changes
+.IR ut_time ,
+sets
+.IR ut_line ,
+and waits
for connection to be established.
.BR login (1),
after a user has been
-authenticated, changes \fIut_type\fP to \fBUSER_PROCESS\fP, changes
-\fIut_time\fP, and sets \fIut_host\fP and \fIut_addr\fP.
+authenticated, changes
+.I ut_type
+to
+.BR USER_PROCESS ,
+changes
+.IR ut_time ,
+and sets
+.I ut_host
+and
+.IR ut_addr .
Depending on
.BR mingetty (8)
(or
and
.BR login (1),
records may be located by
-\fIut_line\fP instead of the preferable \fIut_pid\fP.
+.I ut_line
+instead of the preferable
+.IR ut_pid .
.P
When
.BR init (1)
.P
.BR xterm (1)
and other terminal emulators directly create a
-\fBUSER_PROCESS\fP record and generate the \fIut_id\fP by using the
+.B USER_PROCESS
+record and generate the
+.I ut_id
+by using the
string that suffix part of the terminal name (the characters
following
.IR /dev/ [pt] ty ).
-If they find a \fBDEAD_PROCESS\fP for this ID,
+If they find a
+.B DEAD_PROCESS
+for this ID,
they recycle it, otherwise they create a new entry.
If they can, they
-will mark it as \fBDEAD_PROCESS\fP on exiting and it is advised that
-they null \fIut_line\fP, \fIut_time\fP, \fIut_user\fP, and \fIut_host\fP
+will mark it as
+.B DEAD_PROCESS
+on exiting and it is advised that
+they null
+.IR ut_line ,
+.IR ut_time ,
+.IR ut_user ,
+and
+.I ut_host
as well.
.P
.BR telnetd (8)
-sets up a \fBLOGIN_PROCESS\fP entry and leaves the rest to
+sets up a
+.B LOGIN_PROCESS
+entry and leaves the rest to
.BR login (1)
as usual.
After the telnet session ends,
.BR telnetd (8)
cleans up utmp in the described way.
.P
-The \fIwtmp\fP file records all logins and logouts.
-Its format is exactly like \fIutmp\fP except that a null username
+The
+.I wtmp
+file records all logins and logouts.
+Its format is exactly like
+.I utmp
+except that a null username
indicates a logout
on the associated terminal.
-Furthermore, the terminal name \fB\[ti]\fP
-with username \fBshutdown\fP or \fBreboot\fP indicates a system
-shutdown or reboot and the pair of terminal names \fB|\fP/\fB}\fP
+Furthermore, the terminal name
+.B \[ti]
+with username
+.B shutdown
+or
+.B reboot
+indicates a system shutdown or reboot
+and the pair of terminal names
+.BR | / }
logs the old/new system time when
.BR date (1)
changes it.
-\fIwtmp\fP is maintained by
+.I wtmp
+is maintained by
.BR login (1),
.BR init (1),
and some versions of
mix of the two.
.P
v7/BSD has fewer fields; most importantly it lacks
-\fIut_type\fP, which causes native v7/BSD-like programs to display (for
+.IR ut_type ,
+which causes native v7/BSD-like programs to display (for
example) dead or login entries.
Further, there is no configuration file
which allocates slots to sessions.
-BSD does so because it lacks \fIut_id\fP fields.
+BSD does so because it lacks
+.I ut_id
+fields.
.P
-In Linux (as in System V), the \fIut_id\fP field of a
+In Linux (as in System V), the
+.I ut_id
+field of a
record will never change once it has been set, which reserves that slot
without needing a configuration file.
-Clearing \fIut_id\fP may result
+Clearing
+.I ut_id
+may result
in race conditions leading to corrupted utmp entries and potential
security holes.
Clearing the abovementioned fields by filling them
.P
.\" mtk: What is the referrent of "them" in the following sentence?
.\" System V only uses the type field to mark them and logs
-.\" informative messages such as \fB"new time"\fP in the line field.
-System V has no \fIut_host\fP or \fIut_addr_v6\fP fields.
+.\" informative messages such as \f[B]"new time"\f[] in the line field.
+System V has no
+.I ut_host
+or
+.I ut_addr_v6
+fields.
.SH NOTES
Unlike various other
systems, where utmp logging can be disabled by removing the file, utmp
The file format is machine-dependent, so it is recommended that it be
processed only on the machine architecture where it was created.
.P
-Note that on \fIbiarch\fP platforms, that is, systems which can run both
+Note that on
+.I biarch
+platforms, that is, systems which can run both
32-bit and 64-bit applications (x86-64, ppc64, s390x, etc.),
-\fIut_tv\fP is the same size in 32-bit mode as in 64-bit mode.
-The same goes for \fIut_session\fP and \fIut_time\fP if they are present.
+.I ut_tv
+is the same size in 32-bit mode as in 64-bit mode.
+The same goes for
+.I ut_session
+and
+.I ut_time
+if they are present.
This allows data files and shared memory to be shared between
32-bit and 64-bit applications.
This is achieved by changing the type of
.I tv_sec
and
.IR tv_usec .
-Since \fIut_tv\fP may not be the same as \fIstruct timeval\fP,
+Since
+.I ut_tv
+may not be the same as
+.IR struct\~timeval ,
then instead of the call:
.P
.in +4n
.EE
.in
.\" .P
-.\" Note that the \fIutmp\fP struct from libc5 has changed in libc6.
+.\" Note that the \f[I]utmp\f[] struct from libc5 has changed in libc6.
.\" Because of this,
.\" binaries using the old libc5 struct will corrupt
.\" .IR /var/run/utmp " and/or " /var/log/wtmp .
.P
.in +4n
.EX
-$ \fB./a.out /dev/stdin /dev/stdin\fP
+.RB $ " ./a.out /dev/stdin /dev/stdin" ;
opened /dev/stdin on descriptor 3
opened /dev/stdin on descriptor 4
aio_error():
for request 0 (descriptor 3): In progress
for request 1 (descriptor 4): In progress
-\fBabc\fP
+.B abc
I/O completion signal received
aio_error():
for request 0 (descriptor 3): I/O succeeded
for request 1 (descriptor 4): In progress
aio_error():
for request 1 (descriptor 4): In progress
-\fBx\fP
+.B x
I/O completion signal received
aio_error():
for request 1 (descriptor 4): I/O succeeded
tab(:) allbox;
c s
l l.
-\fIarp_flags\fR
+\f[I]arp_flags\f[]
flag:meaning
ATF_COM:Lookup complete
ATF_PERM:Permanent entry
.P
The following table contains the 128 ASCII characters.
.P
-C program \f(CW\[aq]\[rs]X\[aq]\fP escapes are noted.
+C program \f[CW]\[aq]\[rs]X\[aq]\f[] escapes are noted.
.P
.EX
.TS
.SH NAME
boot \- System bootup process based on UNIX System V Release 4
.SH DESCRIPTION
-The \fBbootup process\fR (or "\fBboot sequence\fR") varies in details
+The
+.B bootup process
+(or
+.RB \[dq] boot\~sequence \[dq])
+varies in details
among systems, but can be roughly divided into phases controlled by
the following components:
.IP (1) 5
.IP (3)
kernel
.IP (4)
-root user-space process (\fIinit\fR and \fIinittab\fR)
+root user-space process
+.RB ( init (8)
+and
+.BR inittab (5))
.IP (5)
boot scripts
.P
After power-on or hard reset, control is given
to a program stored in read-only memory (normally
PROM); for historical reasons involving the personal
-computer, this program is often called "the \fBBIOS\fR".
+computer, this program is often called "the
+.BR BIOS \[dq].
.P
This program normally performs a basic self-test of the
machine and accesses nonvolatile memory to read
further parameters.
This memory in the PC is
battery-backed CMOS memory, so most people
-refer to it as "the \fBCMOS\fR"; outside
-of the PC world, it is usually called "the \fBNVRAM\fR"
+refer to it as "the
+.BR CMOS \[dq];
+outside
+of the PC world, it is usually called "the
+.BR NVRAM \[dq]
(nonvolatile RAM).
.P
The parameters stored in the NVRAM vary among
systems, but as a minimum, they should specify
which device can supply an OS loader, or at least which
devices may be probed for one; such a device is known as "the
-\fBboot device\fR".
+.BR boot\~device \[dq].
The hardware boot stage loads the OS loader from a fixed position on
the boot device, and then transfers control to it.
.TP
to the kernel.
.P
In a traditional PC, the OS loader is located in the initial 512-byte block
-of the boot device; this block is known as "the \fBMBR\fR"
+of the boot device; this block is known as "the
+.BR MBR \[dq]
(Master Boot Record).
.P
In most systems, the OS loader is very
.SS Kernel
When the kernel is loaded, it initializes various components of
the computer and operating system; each portion of software
-responsible for such a task is usually consider "a \fBdriver\fR" for
-the applicable component.
+responsible for such a task is usually consider "a
+.BR driver \[dq]
+for the applicable component.
The kernel starts the virtual memory
swapper (it is a kernel process, called "kswapd" in a modern Linux
kernel), and mounts some filesystem at the root path,
without parameters displays the possible arguments.
.SS Sequencing directories
To make specific scripts start/stop at specific run levels and in a
-specific order, there are \fIsequencing directories\fR, normally
-of the form \fI/etc/rc[0\-6S].d\fR.
+specific order, there are
+.IR sequencing\~directories ,
+normally of the form
+.IR /etc/rc[0\-6S].d .
In each of these directories,
-there are links (usually symbolic) to the scripts in the \fI/etc/init.d\fR
+there are links (usually symbolic) to the scripts in the
+.I /etc/init.d
directory.
.P
-A primary script (usually \fI/etc/rc\fR) is called from
+A primary script (usually
+.IR /etc/rc )
+is called from
.BR inittab (5);
this primary script calls each service's script via a link in the
relevant sequencing directory.
the argument "stop" (thereby stopping the service).
.P
To define the starting or stopping order within the same run level,
-the name of a link contains an \fBorder-number\fR.
+the name of a link contains an
+.BR order-number .
Also, for clarity, the name of a link usually
ends with the name of the service to which it refers.
For example,
-the link \fI/etc/rc2.d/S80sendmail\fR starts the
+the link
+.I /etc/rc2.d/S80sendmail
+starts the
.BR sendmail (8)
service on
run level 2.
-This happens after \fI/etc/rc2.d/S12syslog\fR is run
-but before \fI/etc/rc2.d/S90xfs\fR is run.
+This happens after
+.I /etc/rc2.d/S12syslog
+is run
+but before
+.I /etc/rc2.d/S90xfs
+is run.
.P
To manage these links is to manage the boot order and run levels;
under many systems, there are tools to help with this task
(e.g.,
.BR chkconfig (8)).
.SS Boot configuration
-A program that provides a service is often called a "\fBdaemon\fR".
+A program that provides a service is often called a
+.RB \[dq] daemon \[dq].
Usually, a daemon may receive various command-line options
and parameters.
To allow a system administrator to change these
inputs without editing an entire boot script,
some separate configuration file is used, and is located in a specific
directory where an associated boot script may find it
-(\fI/etc/sysconfig\fR on older Red Hat systems).
+.RI ( /etc/sysconfig
+on older Red Hat systems).
.P
In older UNIX systems, such a file contained the actual command line
options for a daemon, but in modern Linux systems (and also
in HP-UX), it just contains shell variables.
-A boot script in \fI/etc/init.d\fR reads and includes its configuration
-file (that is, it "\fBsources\fR" its configuration file) and then uses
+A boot script in
+.I /etc/init.d
+reads and includes its configuration
+file (that is, it
+.RB \[dq] sources \[dq]
+its configuration file) and then uses
the variable values.
.SH FILES
.IR /etc/init.d/ ,
.P
.in +4n
.EX
-$ \fBsudo strace \-o trace.log \-u ceci ./myprivprog\fP
+.RB $ " sudo strace \-o trace.log \-u ceci ./myprivprog"
.EE
.in
.P
.P
.in +4n
.EX
-# \fBmkdir \-p /sys/fs/cgroup/freezer/sub2\fP
-# \fBsleep 10000 &\fP # Create a process that lives for a while
+.RB # " mkdir \-p /sys/fs/cgroup/freezer/sub2" ;
+.RB # " sleep 10000 &" # Create a process that lives for a while
[1] 20124
-# \fBecho 20124 > /sys/fs/cgroup/freezer/sub2/cgroup.procs\fP
+.RB # " echo 20124 > /sys/fs/cgroup/freezer/sub2/cgroup.procs" ;
.EE
.in
.P
.P
.in +4n
.EX
-# \fBmkdir \-p /sys/fs/cgroup/freezer/sub\fP
-# \fBecho $$\fP # Show PID of this shell
+.RB # " mkdir \-p /sys/fs/cgroup/freezer/sub" ;
+.RB # " echo $$" "; # Show PID of this shell"
30655
-# \fBecho 30655 > /sys/fs/cgroup/freezer/sub/cgroup.procs\fP
-# \fBcat /proc/self/cgroup | grep freezer\fP
+.RB # " echo 30655 > /sys/fs/cgroup/freezer/sub/cgroup.procs" ;
+.RB # " cat /proc/self/cgroup | grep freezer" ;
7:freezer:/sub
.EE
.in
.P
.in +4n
.EX
-# \fBPS1="sh2# " unshare \-Cm bash\fP
+.RB # " PS1='sh2# ' unshare \-Cm bash" ;
.EE
.in
.P
.P
.in +4n
.EX
-sh2# \fBcat /proc/self/cgroup | grep freezer\fP
+.RB sh2# " cat /proc/self/cgroup | grep freezer" ;
7:freezer:/
-sh2# \fBcat /proc/1/cgroup | grep freezer\fP
+.RB sh2# " cat /proc/1/cgroup | grep freezer" ;
7:freezer:/..
-sh2# \fBcat /proc/20124/cgroup | grep freezer\fP
+.RB sh2# " cat /proc/20124/cgroup | grep freezer" ;
7:freezer:/../sub2
.EE
.in
.P
.in +4n
.EX
-sh2# \fBcat /proc/self/mountinfo | grep freezer\fP
+.RB sh2# " cat /proc/self/mountinfo | grep freezer" ;
155 145 0:32 /.. /sys/fs/cgroup/freezer ...
.EE
.in
.P
.in +4n
.EX
-sh2# \fBmount \-\-make\-rslave /\fP # Don\[aq]t propagate mount events
+.RB sh2# " mount \-\-make\-rslave /" "; # Don\[aq]t propagate mount events"
# to other namespaces
-sh2# \fBumount /sys/fs/cgroup/freezer\fP
-sh2# \fBmount \-t cgroup \-o freezer freezer /sys/fs/cgroup/freezer\fP
-sh2# \fBcat /proc/self/mountinfo | grep freezer\fP
+.RB sh2# " umount /sys/fs/cgroup/freezer" ;
+.RB sh2# " mount \-t cgroup \-o freezer freezer /sys/fs/cgroup/freezer" ;
+.RB sh2# " cat /proc/self/mountinfo | grep freezer" ;
155 145 0:32 / /sys/fs/cgroup/freezer rw,relatime ...
.EE
.in
.B CONFIG_CGROUPS
kernel configuration option.
.TP
-.IR cpu " (since Linux 2.6.24; " \fBCONFIG_CGROUP_SCHED\fP )
+.IR cpu " (since Linux 2.6.24; " \f[B]CONFIG_CGROUP_SCHED\f[] )
Cgroups can be guaranteed a minimum number of "CPU shares"
when a system is busy.
This does not limit a cgroup's CPU usage if the CPUs are not busy.
.I Documentation/scheduler/sched\-bwc.txt
in Linux 5.2 and earlier).
.TP
-.IR cpuacct " (since Linux 2.6.24; " \fBCONFIG_CGROUP_CPUACCT\fP )
+.IR cpuacct " (since Linux 2.6.24; " \f[B]CONFIG_CGROUP_CPUACCT\f[] )
This provides accounting for CPU usage by groups of processes.
.IP
Further information can be found in the kernel source file
.I Documentation/cgroup\-v1/cpuacct.txt
in Linux 5.2 and earlier).
.TP
-.IR cpuset " (since Linux 2.6.24; " \fBCONFIG_CPUSETS\fP )
+.IR cpuset " (since Linux 2.6.24; " \f[B]CONFIG_CPUSETS\f[] )
This cgroup can be used to bind the processes in a cgroup to
a specified set of CPUs and NUMA nodes.
.IP
in Linux 5.2 and earlier).
.
.TP
-.IR memory " (since Linux 2.6.25; " \fBCONFIG_MEMCG\fP )
+.IR memory " (since Linux 2.6.25; " \f[B]CONFIG_MEMCG\f[] )
The memory controller supports reporting and limiting of process memory, kernel
memory, and swap used by cgroups.
.IP
.I Documentation/cgroup\-v1/memory.txt
in Linux 5.2 and earlier).
.TP
-.IR devices " (since Linux 2.6.26; " \fBCONFIG_CGROUP_DEVICE\fP )
+.IR devices " (since Linux 2.6.26; " \f[B]CONFIG_CGROUP_DEVICE\f[] )
This supports controlling which processes may create (mknod) devices as
well as open them for reading or writing.
The policies may be specified as allow-lists and deny-lists.
.I Documentation/cgroup\-v1/devices.txt
in Linux 5.2 and earlier).
.TP
-.IR freezer " (since Linux 2.6.28; " \fBCONFIG_CGROUP_FREEZER\fP )
+.IR freezer " (since Linux 2.6.28; " \f[B]CONFIG_CGROUP_FREEZER\f[] )
The
.I freezer
cgroup can suspend and restore (resume) all processes in a cgroup.
.I Documentation/cgroup\-v1/freezer\-subsystem.txt
in Linux 5.2 and earlier).
.TP
-.IR net_cls " (since Linux 2.6.29; " \fBCONFIG_CGROUP_NET_CLASSID\fP )
+.IR net_cls " (since Linux 2.6.29; " \f[B]CONFIG_CGROUP_NET_CLASSID\f[] )
This places a classid, specified for the cgroup, on network packets
created by a cgroup.
These classids can then be used in firewall rules,
.I Documentation/cgroup\-v1/net_cls.txt
in Linux 5.2 and earlier).
.TP
-.IR blkio " (since Linux 2.6.33; " \fBCONFIG_BLK_CGROUP\fP )
+.IR blkio " (since Linux 2.6.33; " \f[B]CONFIG_BLK_CGROUP\f[] )
The
.I blkio
cgroup controls and limits access to specified block devices by
.I Documentation/cgroup\-v1/blkio\-controller.txt
in Linux 5.2 and earlier).
.TP
-.IR perf_event " (since Linux 2.6.39; " \fBCONFIG_CGROUP_PERF\fP )
+.IR perf_event " (since Linux 2.6.39; " \f[B]CONFIG_CGROUP_PERF\f[] )
This controller allows
.I perf
monitoring of the set of processes grouped in a cgroup.
.IP
Further information can be found in the kernel source files
.TP
-.IR net_prio " (since Linux 3.3; " \fBCONFIG_CGROUP_NET_PRIO\fP )
+.IR net_prio " (since Linux 3.3; " \f[B]CONFIG_CGROUP_NET_PRIO\f[] )
This allows priorities to be specified, per network interface, for cgroups.
.IP
Further information can be found in the kernel source file
.I Documentation/cgroup\-v1/net_prio.txt
in Linux 5.2 and earlier).
.TP
-.IR hugetlb " (since Linux 3.5; " \fBCONFIG_CGROUP_HUGETLB\fP )
+.IR hugetlb " (since Linux 3.5; " \f[B]CONFIG_CGROUP_HUGETLB\f[] )
This supports limiting the use of huge pages by cgroups.
.IP
Further information can be found in the kernel source file
.I Documentation/cgroup\-v1/hugetlb.txt
in Linux 5.2 and earlier).
.TP
-.IR pids " (since Linux 4.3; " \fBCONFIG_CGROUP_PIDS\fP )
+.IR pids " (since Linux 4.3; " \f[B]CONFIG_CGROUP_PIDS\f[] )
This controller permits limiting the number of process that may be created
in a cgroup (and its descendants).
.IP
.I Documentation/cgroup\-v1/pids.txt
in Linux 5.2 and earlier).
.TP
-.IR rdma " (since Linux 4.11; " \fBCONFIG_CGROUP_RDMA\fP )
+.IR rdma " (since Linux 4.11; " \f[B]CONFIG_CGROUP_RDMA\f[] )
The RDMA controller permits limiting the use of
RDMA/IB-specific resources per cgroup.
.IP
.P
.in +4n
.EX
-$ \fBcat mygrp/cgroup.events\fP
+.RB $ " cat mygrp/cgroup.events"
populated 1
frozen 0
.EE
.IP
.in +4n
.EX
-$ \fBcat /sys/kernel/cgroup/delegate\fP
+.RB $ " cat /sys/kernel/cgroup/delegate"
cgroup.procs
cgroup.subtree_control
cgroup.threads
.IP
.in +4n
.EX
-$ \fBcat /sys/kernel/cgroup/features\fP
+.RB $ " cat /sys/kernel/cgroup/features"
nsdelegate
memory_localevents
.EE
G0 always has size 94 and uses codes 041\[en]0176.
.P
Switching between character sets is done using the shift functions
-\fB\[ha]N\fP (SO or LS1), \fB\[ha]O\fP (SI or LS0), ESC n (LS2), ESC o (LS3),
+.B \[ha]N
+(SO or LS1),
+.B \[ha]O
+(SI or LS0), ESC n (LS2), ESC o (LS3),
ESC N (SS2), ESC O (SS3), ESC \[ti] (LS1R), ESC } (LS2R), ESC | (LS3R).
-The function LS\fIn\fP makes character set G\fIn\fP the current one
+The function
+.RI LS n
+makes character set
+.RI G n
+the current one
for codes with high bit zero.
-The function LS\fIn\fPR makes character set G\fIn\fP the current one
+The function
+.RI LS n R
+makes character set
+.RI G n
+the current one
for codes with high bit one.
-The function SS\fIn\fP makes character set G\fIn\fP (\fIn\fP=2 or 3)
+The function
+.RI SS n
+makes character set
+.RI G n
+.RI ( n =2
+or 3)
the current one for the next character only (regardless of the value
of its high order bit).
.P
-A 94-character set is designated as G\fIn\fP character set
+A 94-character set is designated as
+.RI G n
+character set
by an escape sequence ESC ( xx (for G0), ESC ) xx (for G1),
ESC * xx (for G2), ESC + xx (for G3), where xx is a symbol
or a pair of symbols found in the ISO/IEC\~2375 International
for African languages, ESC ( ! A selects the Cuban character
set, and so on.
.P
-A 96-character set is designated as G\fIn\fP character set
+A 96-character set is designated as
+.RI G n
+character set
by an escape sequence ESC \- xx (for G1), ESC . xx (for G2)
or ESC / xx (for G3).
For example, ESC \- G selects the Hebrew alphabet as G1.
.P
-A multibyte character set is designated as G\fIn\fP character set
+A multibyte character set is designated as
+.RI G n
+character set
by an escape sequence ESC $ xx or ESC $ ( xx (for G0),
ESC $ ) xx (for G1), ESC $ * xx (for G2), ESC $ + xx (for G3).
For example, ESC $ ( C selects the Korean character set for G0.
ISO/IEC\~4873 stipulates a narrower use of character sets, where G0
is fixed (always ASCII), so that G1, G2, and G3
can be invoked only for codes with the high order bit set.
-In particular, \fB\[ha]N\fP and \fB\[ha]O\fP are not used anymore, ESC ( xx
+In particular,
+.B \[ha]N
+and
+.B \[ha]O
+are not used anymore, ESC ( xx
can be used only with xx=B, and ESC ) xx, ESC * xx, ESC + xx
are equivalent to ESC \- xx, ESC . xx, ESC / xx, respectively.
.SS TIS-620
after it is released, that is, after all processes cease using
it (i.e., terminate or are moved to a different cpuset)
and all child cpuset directories have been removed.
-See the \fBNotify On Release\fR section, below.
+See the
+.B Notify On Release \" Sx
+section, below.
.\" ====================== cpus ======================
.TP
.I cpuset.cpus
List of the physical numbers of the CPUs on which processes
in that cpuset are allowed to execute.
-See \fBList Format\fR below for a description of the
-format of
+See
+.B List Format \" Sx
+below for a description of the format of
.IR cpus .
.IP
The CPUs allowed to a cpuset may be changed by
.I cpuset.mems
List of memory nodes on which processes in this cpuset are
allowed to allocate memory.
-See \fBList Format\fR below for a description of the
-format of
+See
+.B List Format \" Sx
+below for a description of the format of
.IR mems .
.\" ==================== mem_exclusive ====================
.TP
Flag (0 or 1).
If set (1), the cpuset has exclusive use of
its memory nodes (no sibling or cousin may overlap).
-Also if set (1), the cpuset is a \fBHardwall\fR cpuset (see below).
+Also if set (1), the cpuset is a
+.B Hardwall \" Sx
+cpuset (see below).
By default, this is off (0).
Newly created cpusets also initially default this to off (0).
.IP
.TP
.IR cpuset.mem_hardwall " (since Linux 2.6.26)"
Flag (0 or 1).
-If set (1), the cpuset is a \fBHardwall\fR cpuset (see below).
-Unlike \fBmem_exclusive\fR,
-there is no constraint on whether cpusets
-marked \fBmem_hardwall\fR may have overlapping
-memory nodes with sibling or cousin cpusets.
+If set (1), the cpuset is a
+.B Hardwall
+cpuset (see below).
+Unlike
+.BR mem_exclusive ,
+there is no constraint on whether cpusets marked
+.B mem_hardwall
+may have overlapping memory nodes with sibling or cousin cpusets.
By default, this is off (0).
Newly created cpusets also initially default this to off (0).
.\" ==================== memory_migrate ====================
Flag (0 or 1).
If set (1), then memory migration is enabled.
By default, this is off (0).
-See the \fBMemory Migration\fR section, below.
+See the
+.B Memory Migration \" Sx
+section, below.
.\" ==================== memory_pressure ====================
.TP
.IR cpuset.memory_pressure " (since Linux 2.6.16)"
A measure of how much memory pressure the processes in this
cpuset are causing.
-See the \fBMemory Pressure\fR section, below.
+See the
+.B Memory Pressure \" Sx
+section, below.
Unless
.I memory_pressure_enabled
is enabled, always has value zero (0).
calculations are enabled for all cpusets in the system.
By default, this is off (0).
See the
-\fBMemory Pressure\fR section, below.
+.B Memory Pressure \" Sx
+section, below.
.\" ================== memory_spread_page ==================
.TP
.IR cpuset.memory_spread_page " (since Linux 2.6.17)"
By default, this is off (0) in the top cpuset,
and inherited from the parent cpuset in
newly created cpusets.
-See the \fBMemory Spread\fR section, below.
+See the
+.B Memory Spread \" Sx
+section, below.
.\" ================== memory_spread_slab ==================
.TP
.IR cpuset.memory_spread_slab " (since Linux 2.6.17)"
By default, is off (0) in the top cpuset,
and inherited from the parent cpuset in
newly created cpusets.
-See the \fBMemory Spread\fR section, below.
+See the
+.B Memory Spread \" Sx
+section, below.
.\" ================== sched_load_balance ==================
.TP
.IR cpuset.sched_load_balance " (since Linux 2.6.24)"
some other cpuset with overlapping CPUs has its
.I sched_load_balance
flag set.
-See \fBScheduler Load Balancing\fR, below, for further details.
+See
+.BR "Scheduler Load Balancing" , \" Sx
+below, for further details.
.\" ================== sched_relax_domain_level ==================
.TP
.IR cpuset.sched_relax_domain_level " (since Linux 2.6.26)"
.IR sched_relax_domain_level ,
the wider
the range of CPUs over which immediate load balancing is attempted.
-See \fBScheduler Relax Domain Level\fR, below, for further details.
+See
+.BR "Scheduler Relax Domain Level" , \" Sx
+below, for further details.
.\" ================== proc cpuset ==================
.P
In addition to the above pseudo-files in each directory below
(on which CPUs it may be scheduled) and
.I Mems_allowed
(on which memory nodes it may obtain memory),
-in the two formats \fBMask Format\fR and \fBList Format\fR (see below)
+in the two formats
+.B Mask Format \" Sx
+and
+.B List Format \" Sx
+(see below)
as shown in the following example:
.P
.in +4n
it is not computed for any cpuset, and reads from any
.I memory_pressure
always return zero, as represented by the ASCII string "0\[rs]n".
-See the \fBWARNINGS\fR section, below.
+See the
+.B WARNINGS \" Sx
+section, below.
.P
A per-cpuset, running average is employed for the following reasons:
.IP \[bu] 3
.P
By default, load balancing is done across all CPUs, except those
marked isolated using the kernel boot time "isolcpus=" argument.
-(See \fBScheduler Relax Domain Level\fR, below, to change this default.)
+(See
+.BR "Scheduler Relax Domain Level" , \" Sx
+below, to change this default.)
.P
This default load balancing across all CPUs is not well suited to
the following two situations:
.I sched_load_balance
is disabled, then the
scheduler will avoid load balancing across the CPUs in that cpuset,
-\fIexcept\fR in so far as is necessary because some overlapping cpuset
+.I except
+in so far as is necessary because some overlapping cpuset
has
.I sched_load_balance
enabled.
CPUs and memory nodes.
.\" ================== Mask Format ==================
.SS Mask format
-The \fBMask Format\fR is used to represent CPU and memory-node bit masks
-in the
+The Mask Format is used to
+represent CPU and memory-node bit masks in the
.IR /proc/ pid /status
file.
.P
The number of 32-bit words displayed is the minimum number needed to
display all bits of the bit mask, based on the size of the bit mask.
.P
-Examples of the \fBMask Format\fR:
+Examples of the
+.BR Mask\~Format :
.P
.in +4n
.EX
fifth for bit 4, and the "7" is for bits 2, 1, and 0.
.\" ================== List Format ==================
.SS List format
-The \fBList Format\fR for
+The List Format for
.I cpus
and
.I mems
is a comma-separated list of CPU or memory-node
numbers and ranges of numbers, in ASCII decimal.
.P
-Examples of the \fBList Format\fR:
+Examples of the
+.BR List\~Format :
.P
.in +4n
.EX
A process's group membership can be set using
.BR setpgid (2).
The process whose process ID is the same as its process group ID is the
-\fIprocess group leader\fP for that group.
+.I process group leader
+for that group.
.P
A session is a collection of processes that share the same session ID.
All of the members of a process group also have the same session ID
which creates a new session whose session ID is the same
as the PID of the process that called
.BR setsid (2).
-The creator of the session is called the \fIsession leader\fP.
+The creator of the session is called the
+.IR session\~leader .
.P
All of the processes in a session share a
.IR "controlling terminal" .
.P
By convention, the strings in
.I environ
-have the form "\fIname\fP\fB=\fP\fIvalue\fP".
+have the form
+. RI \[dq] name\f[B]=\f[]value \[dq].
The name is case-sensitive and may not contain
-the character "\fB=\fP".
+the character
+.RB \[dq] = \[dq].
The value can be anything that can be represented as a string.
The name and the value may not contain an embedded null byte (\[aq]\[rs]0\[aq]),
since this is assumed to terminate the string.
and many other
programs employ when searching for an executable file that is specified
as a simple filename (i.a., a pathname that contains no slashes).
-The prefixes are separated by colons (\fB:\fP).
+The prefixes are separated by colons
+.RB ( : ).
The list of prefixes is searched from beginning to end,
by checking the pathname formed by concatenating
a prefix, a slash, and the filename,
.P
.in +4n
.EX
-# \fB./fanotify_example /home\fP
+.RB # " ./fanotify_example /home" ;
Press enter key to terminate.
Listening for events.
FAN_OPEN_PERM: File /home/user/temp/notes
.P
.in +4n
.EX
-# \fB./fanotify_fid /home/user\fP
+.RB # " ./fanotify_fid /home/user" ;
Listening for events.
FAN_CREATE (file created):
Directory /home/user has been modified.
Entry \[aq]testfile.txt\[aq] is not a subdirectory.
All events processed successfully. Program exiting.
\&
-$ \fBtouch /home/user/testfile.txt\fP # In another terminal
+.RB $ " touch /home/user/testfile.txt" "; # In another terminal"
.EE
.in
.P
.P
.in +4n
.EX
-# \fB./fanotify_fid /home/user\fP
+.RB # " ./fanotify_fid /home/user" ;
Listening for events.
FAN_CREATE | FAN_ONDIR (subdirectory created):
Directory /home/user has been modified.
Entry \[aq]testdir\[aq] is a subdirectory.
All events processed successfully. Program exiting.
\&
-$ \fBmkdir \-p /home/user/testdir\fP # In another terminal
+.RB $ " mkdir \-p /home/user/testdir" "; # In another terminal"
.EE
.in
.SS Program source: fanotify_fid.c
and the macros are not defined by default.
.SS Feature test macros understood by glibc
The paragraphs below explain how feature test macros are handled
-in glibc 2.\fIx\fP,
+in glibc
+.RI 2. x ,
.I x
> 0.
.P
.P
.in +4n
.EX
-$ \fBcc ftm.c\fP
-$ \fB./a.out\fP
+.RB $ " cc ftm.c"
+.RB $ " ./a.out"
_POSIX_SOURCE defined
_POSIX_C_SOURCE defined: 200809L
_BSD_SOURCE defined
_SVID_SOURCE defined
_ATFILE_SOURCE defined
-$ \fBcc \-D_XOPEN_SOURCE=500 ftm.c\fP
-$ \fB./a.out\fP
+.RB $ " cc \-D_XOPEN_SOURCE=500 ftm.c"
+.RB $ " ./a.out"
_POSIX_SOURCE defined
_POSIX_C_SOURCE defined: 199506L
_XOPEN_SOURCE defined: 500
-$ \fBcc \-D_GNU_SOURCE ftm.c\fP
-$ \fB./a.out\fP
+.RB $ " cc \-D_GNU_SOURCE ftm.c"
+.RB $ " ./a.out"
_POSIX_SOURCE defined
_POSIX_C_SOURCE defined: 200809L
_ISOC99_SOURCE defined
.P
.B "Character classes"
.P
-An expression "\fI[...]\fP" where the first character after the
+An expression
+.RI \[dq] [...] \[dq]
+where the first character after the
leading \[aq][\[aq] is not an \[aq]!\[aq] matches a single character,
namely any of the characters enclosed by the brackets.
The string enclosed by the brackets cannot be empty;
therefore \[aq]]\[aq] can be allowed between the brackets, provided
that it is the first character.
-(Thus, "\fI[][!]\fP" matches the
+(Thus,
+.RI \[dq] [][!] \[dq]
+matches the
three characters \[aq][\[aq], \[aq]]\[aq], and \[aq]!\[aq].)
.P
.B Ranges
There is one special convention:
two characters separated by \[aq]\-\[aq] denote a range.
(Thus,
-"\fI[A\-Fa\-f0\-9]\fP" is equivalent to "\fI[ABCDEFabcdef0123456789]\fP".)
+.RI \[dq] [A\-Fa\-f0\-9] \[dq]
+is equivalent to
+.RI \[dq] [ABCDEFabcdef0123456789] \[dq].)
One may include \[aq]\-\[aq] in its literal meaning
by making it the first or last character between the brackets.
(Thus,
-"\fI[]\-]\fP" matches just the two characters \[aq]]\[aq] and \[aq]\-\[aq],
-and "\fI[\-\-0]\fP" matches the
+.RI \[dq] []\-] \[dq]
+matches just the two characters \[aq]]\[aq] and \[aq]\-\[aq],
+and
+.RI \[dq] [\-\-0] \[dq]
+matches the
three characters \[aq]\-\[aq], \[aq].\[aq], and \[aq]0\[aq],
since \[aq]/\[aq] cannot be matched.)
.P
.B Complementation
.P
-An expression "\fI[!...]\fP" matches a single character, namely
+An expression
+.RI \[dq] [!...] \[dq]
+matches a single character, namely
any character that is not matched by the expression obtained
by removing the first \[aq]!\[aq] from it.
-(Thus, "\fI[!]a\-]\fP" matches any
+(Thus,
+.RI \[dq] [!]a\-] \[dq]
+matches any
single character except \[aq]]\[aq], \[aq]a\[aq], and \[aq]\-\[aq].)
.P
One can remove the special meaning of \[aq]?\[aq], \[aq]*\[aq], and \[aq][\[aq]
in case this is part of a shell command line,
enclosing them in quotes.
Between brackets these characters stand for themselves.
-Thus, "\fI[[?*\[rs]]\fP" matches the
+Thus,
+.RI \[dq] [[?*\[rs]] \[dq]
+matches the
four characters \[aq][\[aq], \[aq]?\[aq], \[aq]*\[aq], and \[aq]\[rs]\[aq].
.SS Pathnames
Globbing is applied on each of the components of a pathname
separately.
A \[aq]/\[aq] in a pathname cannot be matched by a \[aq]?\[aq] or \[aq]*\[aq]
-wildcard, or by a range like "\fI[.\-0]\fP".
+wildcard, or by a range like
+.RI \[dq] [.\-0] \[dq].
A range containing an explicit \[aq]/\[aq] character is syntactically incorrect.
(POSIX requires that syntactically incorrect patterns are left unchanged.)
.P
If a filename starts with a \[aq].\[aq],
this character must be matched explicitly.
-(Thus, \fIrm\ *\fP will not remove .profile, and \fItar\ c\ *\fP will not
-archive all your files; \fItar\ c\ .\fP is better.)
+(Thus,
+.I rm\ *
+will not remove
+.IR .profile ,
+and
+.I tar\ c\ *
+will not archive all your files;
+.I tar\ c\ .
+is better.)
.SS Empty lists
The nice and simple rule given above: "expand a wildcard pattern
into the list of matching pathnames" was the original UNIX
.P
Now that regular expressions have bracket expressions where
the negation is indicated by a \[aq]\[ha]\[aq], POSIX has declared the
-effect of a wildcard pattern "\fI[\[ha]...]\fP" to be undefined.
+effect of a wildcard pattern
+.RI \[dq] [\[ha]...] \[dq]
+to be undefined.
.SS Character classes and internationalization
Of course ranges were originally meant to be ASCII ranges,
-so that "\fI[\ \-%]\fP" stands for "\fI[\ !"#$%]\fP" and "\fI[a\-z]\fP" stands
+so that
+.RI \[dq] "[\ \-%]" \[dq]
+stands for
+.RI \[dq] "[\ !\[dq]#$%]" \[dq]
+and
+.RI \[dq] [a\-z] \[dq]
+stands
for "any lowercase letter".
Some UNIX implementations generalized this so that a range X\-Y
stands for the set of characters with code between the codes for
[:punct:] [:space:] [:upper:] [:xdigit:]
.fi
.P
-so that one can say "\fI[[:lower:]]\fP" instead of "\fI[a\-z]\fP", and have
-things work in Denmark, too, where there are three letters past \[aq]z\[aq]
+so that one can say
+.RI \[dq] [[:lower:]] \[dq]
+instead of
+.RI \[dq] [a\-z] \[dq],
+and have things work in Denmark, too,
+where there are three letters past \[aq]z\[aq]
in the alphabet.
These character classes are defined by the
.B LC_CTYPE
category
in the current locale.
.P
-(v) Collating symbols, like "\fI[.ch.]\fP" or "\fI[.a-acute.]\fP",
-where the string between "\fI[.\fP" and "\fI.]\fP" is a collating
-element defined for the current locale.
+(v) Collating symbols, like
+.RI \[dq] [.ch.] \[dq]
+or
+.RI \[dq] [.a-acute.] \[dq],
+where the string between
+.RI \[dq] [. \[dq]
+and
+.RI \[dq] .] \[dq]
+is a collating element defined for the current locale.
Note that this may
be a multicharacter element.
.P
-(vi) Equivalence class expressions, like "\fI[=a=]\fP",
-where the string between "\fI[=\fP" and "\fI=]\fP" is any collating
-element from its equivalence class, as defined for the
-current locale.
-For example, "\fI[[=a=]]\fP" might be equivalent
-to "\fI[a\('a\(`a\(:a\(^a]\fP", that is,
-to "\fI[a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]]\fP".
+(vi) Equivalence class expressions, like
+.RI \[dq] [=a=] \[dq],
+where the string between
+.RI \[dq] [= \[dq]
+and
+.RI \[dq] =] \[dq]
+is any collating element from its equivalence class,
+as defined for the current locale.
+For example,
+.RI \[dq] [[=a=]] \[dq]
+might be equivalent to
+.RI \[dq] [a\('a\(`a\(:a\(^a] \[dq],
+that is, to
+.RI \[dq] [a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]] \[dq].
.SH SEE ALSO
.BR sh (1),
.BR fnmatch (3),
.BR statx (2):
.TP
Device where inode resides
-\fIstat.st_dev\fP; \fIstatx.stx_dev_minor\fP and \fIstatx.stx_dev_major\fP
+.IR stat.st_dev ;
+.I statx.stx_dev_minor
+and
+.I statx.stx_dev_major
.IP
Each inode (as well as the associated file) resides in a filesystem
that is hosted on a device.
and minor ID (which identifies a specific instance in the general class).
.TP
Inode number
-\fIstat.st_ino\fP; \fIstatx.stx_ino\fP
+.IR stat.st_ino ;
+.I statx.stx_ino
.IP
Each file in a filesystem has a unique inode number.
Inode numbers are guaranteed to be unique only within a filesystem
This field contains the file's inode number.
.TP
File type and mode
-\fIstat.st_mode\fP; \fIstatx.stx_mode\fP
+.IR stat.st_mode ;
+.I statx.stx_mode
.IP
See the discussion of file type and mode, below.
.TP
Link count
-\fIstat.st_nlink\fP; \fIstatx.stx_nlink\fP
+.IR stat.st_nlink ;
+.I statx.stx_nlink
.IP
This field contains the number of hard links to the file.
Additional links to an existing file are created using
.BR link (2).
.TP
User ID
-\fIstat.st_uid\fP; \fIstatx.stx_uid\fP
+.IR stat.st_uid ;
+.I statx.stx_uid
.IP
This field records the user ID of the owner of the file.
For newly created files,
.BR chown (2).
.TP
Group ID
-\fIstat.st_gid\fP; \fIstatx.stx_gid\fP
+.IR stat.st_gid ;
+.I statx.stx_gid
.IP
The inode records the ID of the group owner of the file.
For newly created files,
.BR chown (2).
.TP
Device represented by this inode
-\fIstat.st_rdev\fP; \fIstatx.stx_rdev_minor\fP and \fIstatx.stx_rdev_major\fP
+.IR stat.st_rdev ;
+.I statx.stx_rdev_minor
+and
+.I statx.stx_rdev_major
.IP
If this file (inode) represents a device,
then the inode records the major and minor ID of that device.
.TP
File size
-\fIstat.st_size\fP; \fIstatx.stx_size\fP
+.IR stat.st_size ;
+.I statx.stx_size
.IP
This field gives the size of the file (if it is a regular
file or a symbolic link) in bytes.
it contains, without a terminating null byte.
.TP
Preferred block size for I/O
-\fIstat.st_blksize\fP; \fIstatx.stx_blksize\fP
+.IR stat.st_blksize ;
+.I statx.stx_blksize
.IP
This field gives the "preferred" blocksize for efficient filesystem I/O.
(Writing to a file in smaller chunks may cause
an inefficient read-modify-rewrite.)
.TP
Number of blocks allocated to the file
-\fIstat.st_blocks\fP; \fIstatx.stx_blocks\fP
+.IR stat.st_blocks ;
+.I statx.stx_blocks
.IP
This field indicates the number of blocks allocated to the file,
512-byte units,
Furthermore, the unit may differ on a per-filesystem basis.
.TP
Last access timestamp (atime)
-\fIstat.st_atime\fP; \fIstatx.stx_atime\fP
+.IR stat.st_atime ;
+.I statx.stx_atime
.IP
This is the file's last access timestamp.
It is changed by file accesses, for example, by
.BR open (2).
.TP
File creation (birth) timestamp (btime)
-(not returned in the \fIstat\fP structure); \fIstatx.stx_btime\fP
+(not returned in the
+.I stat
+structure);
+.I statx.stx_btime
.IP
The file's creation timestamp.
This is set on file creation and not changed subsequently.
.\" FIXME Is it supported on ext4 and XFS?
.TP
Last modification timestamp (mtime)
-\fIstat.st_mtime\fP; \fIstatx.stx_mtime\fP
+.IR stat.st_mtime ;
+.I statx.stx_mtime
.IP
This is the file's last modification timestamp.
It is changed by file modifications, for example, by
changed for changes in owner, group, hard link count, or mode.
.TP
Last status change timestamp (ctime)
-\fIstat.st_ctime\fP; \fIstatx.stx_ctime\fP
+.IR stat.st_ctime ;
+.I statx.stx_ctime
.IP
This is the file's last status change timestamp.
It is changed by writing or by setting inode information
.BR S_IXUSR .
.SH NOTES
For pseudofiles that are autogenerated by the kernel, the file size
-(\fIstat.st_size\fP; \fIstatx.stx_size\fP)
+.RI ( stat.st_size ;
+.IR statx.stx_size )
reported by the kernel is not accurate.
For example, the value 0 is returned for many files under the
.I /proc
uint32_t mask; /* Mask describing event */
uint32_t cookie; /* Unique cookie associating related
events (for rename(2)) */
- uint32_t len; /* Size of \fIname\fP field */
+ uint32_t len; /* Size of \f[I]name\f[] field */
char name[]; /* Optional null\-terminated name */
};
.EE
.SS Example output
.in +4n
.EX
-$ \fB./a.out /tmp /home/user/temp\fP
+.RB $ " ./a.out /tmp /home/user/temp" ;
Press enter key to terminate.
Listening for events.
IN_OPEN: /home/user/temp/foo [file]
.\" .B #include <net/netinet.h> -- does not exist anymore
.\" .B #include <linux/errqueue.h> -- never include <linux/foo.h>
.B #include <netinet/in.h>
-.B #include <netinet/ip.h> \fR/* superset of previous */
+.BR "#include <netinet/ip.h>" " /* superset of previous */"
.P
.IB tcp_socket " = socket(AF_INET, SOCK_STREAM, 0);"
.IB udp_socket " = socket(AF_INET, SOCK_DGRAM, 0);"
Special keyrings
There are special keyrings owned by the kernel that can anchor keys
for special purposes.
-An example of this is the \fIsystem keyring\fR used for holding
+An example of this is the
+.I system\~keyring
+used for holding
encryption keys for module signature verification.
.IP
These special keyrings are usually closed to direct alteration
is \[aq]\[rs]0\[aq]. */
char *currency_symbol; /* Local currency symbol */
char *mon_decimal_point; /* Radix character */
- char *mon_thousands_sep; /* Like \fIthousands_sep\fP above */
- char *mon_grouping; /* Like \fIgrouping\fP above */
+ char *mon_thousands_sep; /* Like \f[I]thousands_sep\f[] above */
+ char *mon_grouping; /* Like \f[I]grouping\f[] above */
char *positive_sign; /* Sign for positive values */
char *negative_sign; /* Sign for negative values */
char int_frac_digits; /* International fractional digits */
.I title
.SH DESCRIPTION
This page describes the conventions that should be employed
-when writing man pages for the Linux \fIman-pages\fP project,
+when writing man pages for the
+.IR "Linux man-pages project" ,
which documents the user-space API provided by the Linux kernel
and the GNU C library.
The project thus provides most of the pages in Section 2,
.RS
.TS
l l.
-\fBNAME\fP
+\f[B]NAME\f[]
LIBRARY [Normally only in Sections 2, 3]
-\fBSYNOPSIS\fP
+\f[B]SYNOPSIS\f[]
CONFIGURATION [Normally only in Section 4]
-\fBDESCRIPTION\fP
+\f[B]DESCRIPTION\f[]
OPTIONS [Normally only in Sections 1, 8]
EXIT STATUS [Normally only in Sections 1, 8]
RETURN VALUE [Normally only in Sections 2, 3]
AUTHORS [Discouraged]
REPORTING BUGS [Not used in man-pages]
COPYRIGHT [Not used in man-pages]
-\fBSEE ALSO\fP
+\f[B]SEE ALSO\f[]
.TE
.RE
.P
headings if they make things easier to understand (this can
be especially useful for pages in Sections 4 and 5).
However, before doing this, consider whether you could use the
-traditional headings, with some subsections (\fI.SS\fP) within
-those sections.
+traditional headings, with some subsections
+.RI ( .SS )
+within those sections.
.P
The following list elaborates on the contents of each of
the above sections.
See
.BR man (7)
for important details of the line(s) that should follow the
-\fB.SH NAME\fP command.
+.B .SH\~NAME
+command.
All words in this line (including the word immediately
following the "\[rs]\-") should be in lowercase,
except where English or technical terminological convention
Miscellaneous notes.
.IP
For Section 2 and 3 man pages you may find it useful to include
-subsections (\fBSS\fP) named \fILinux Notes\fP and \fIglibc Notes\fP.
+subsections
+.RB ( SS )
+named
+.I Linux\~Notes
+and
+.IR glibc\~Notes .
.IP
In Section 2, use the heading
.I "C library/kernel differences"
command is used.
.IP
For details on writing example programs,
-see \fIExample programs\fP below.
+see
+.I Example\~programs
+below.
.TP
.B AUTHORS
A list of authors of the documentation or program.
.IP
-\fBUse of an AUTHORS section is strongly discouraged\fP.
+.B "Use of an AUTHORS section is strongly discouraged" .
Generally, it is better not to clutter every page with a list
of (over time potentially numerous) authors;
if you write or significantly amend a page,
.P
.in +4n
.EX
-$ \fBdate\fP
+.RB $ " date" ;
Thu Jul 7 13:01:27 CEST 2016
.EE
.in
library function calls.
.IP \[bu]
Example programs should be complete, and compile without
-warnings when compiled with \fIcc\ \-Wall\fP.
+warnings when compiled with
+.IR "cc\ \-Wall" .
.IP \[bu]
Where possible and appropriate, example programs should allow
experimentation, by varying their behavior based on inputs
.P
.in +4n
.EX
-sh1# \fBmount \-\-make\-shared /mntS\fP
-sh1# \fBmount \-\-make\-private /mntP\fP
-sh1# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh1# " mount \-\-make\-shared /mntS"
+.RB sh1# " mount \-\-make\-private /mntP"
+.RB sh1# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
77 61 8:17 / /mntS rw,relatime shared:1
83 61 8:15 / /mntP rw,relatime
.EE
.P
.in +4n
.EX
-sh1# \fBcat /proc/self/mountinfo | awk \[aq]$1 == 61\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh1# " cat /proc/self/mountinfo | awk \[aq]$1 == 61\[aq] | sed \[aq]s/ \- .*//\[aq]"
61 0 8:2 / / rw,relatime
.EE
.in
.P
.in +4n
.EX
-$ \fBPS1=\[aq]sh2# \[aq] sudo unshare \-m \-\-propagation unchanged sh\fP
-sh2# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB $ " PS1=\[aq]sh2# \[aq] sudo unshare \-m \-\-propagation unchanged sh"
+.RB sh2# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
222 145 8:17 / /mntS rw,relatime shared:1
225 145 8:15 / /mntP rw,relatime
.EE
.P
.in +4n
.EX
-sh2# \fBmkdir /mntS/a\fP
-sh2# \fBmount /dev/sdb6 /mntS/a\fP
-sh2# \fBmkdir /mntP/b\fP
-sh2# \fBmount /dev/sdb7 /mntP/b\fP
-sh2# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh2# " mkdir /mntS/a"
+.RB sh2# " mount /dev/sdb6 /mntS/a"
+.RB sh2# " mkdir /mntP/b"
+.RB sh2# " mount /dev/sdb7 /mntP/b"
+.RB sh2# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
222 145 8:17 / /mntS rw,relatime shared:1
225 145 8:15 / /mntP rw,relatime
178 222 8:22 / /mntS/a rw,relatime shared:2
.P
.in +4n
.EX
-sh1# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh1# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
77 61 8:17 / /mntS rw,relatime shared:1
83 61 8:15 / /mntP rw,relatime
179 77 8:22 / /mntS/a rw,relatime shared:2
.P
.in +4n
.EX
-sh1# \fBmount \-\-make\-shared /mntX\fP
-sh1# \fBmount \-\-make\-shared /mntY\fP
-sh1# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh1# " mount \-\-make\-shared /mntX"
+.RB sh1# " mount \-\-make\-shared /mntY"
+.RB sh1# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
132 83 8:23 / /mntX rw,relatime shared:1
133 83 8:22 / /mntY rw,relatime shared:2
.EE
.P
.in +4n
.EX
-sh2# \fBunshare \-m \-\-propagation unchanged sh\fP
-sh2# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh2# " unshare \-m \-\-propagation unchanged sh"
+.RB sh2# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
168 167 8:23 / /mntX rw,relatime shared:1
169 167 8:22 / /mntY rw,relatime shared:2
.EE
.P
.in +4n
.EX
-sh2# \fBmount \-\-make\-slave /mntY\fP
-sh2# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh2# " mount \-\-make\-slave /mntY"
+.RB sh2# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
168 167 8:23 / /mntX rw,relatime shared:1
169 167 8:22 / /mntY rw,relatime master:2
.EE
.P
.in +4n
.EX
-sh2# \fBmkdir /mntX/a\fP
-sh2# \fBmount /dev/sda3 /mntX/a\fP
-sh2# \fBmkdir /mntY/b\fP
-sh2# \fBmount /dev/sda5 /mntY/b\fP
+.RB sh2# " mkdir /mntX/a"
+.RB sh2# " mount /dev/sda3 /mntX/a"
+.RB sh2# " mkdir /mntY/b"
+.RB sh2# " mount /dev/sda5 /mntY/b"
.EE
.in
.P
.P
.in +4n
.EX
-sh2# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh2# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
168 167 8:23 / /mntX rw,relatime shared:1
169 167 8:22 / /mntY rw,relatime master:2
173 168 8:3 / /mntX/a rw,relatime shared:3
.P
.in +4n
.EX
-sh1# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh1# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
132 83 8:23 / /mntX rw,relatime shared:1
133 83 8:22 / /mntY rw,relatime shared:2
174 132 8:3 / /mntX/a rw,relatime shared:3
.P
.in +4n
.EX
-sh1# \fBmkdir /mntY/c\fP
-sh1# \fBmount /dev/sda1 /mntY/c\fP
-sh1# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh1# " mkdir /mntY/c"
+.RB sh1# " mount /dev/sda1 /mntY/c"
+.RB sh1# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
132 83 8:23 / /mntX rw,relatime shared:1
133 83 8:22 / /mntY rw,relatime shared:2
174 132 8:3 / /mntX/a rw,relatime shared:3
.P
.in +4n
.EX
-sh2# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB sh2# " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
168 167 8:23 / /mntX rw,relatime shared:1
169 167 8:22 / /mntY rw,relatime master:2
173 168 8:3 / /mntX/a rw,relatime shared:3
.P
.in +4n
.EX
-# \fBmount | awk \[aq]{print $1, $2, $3}\[aq]\fP
+.RB # " mount | awk \[aq]{print $1, $2, $3}\[aq]"
/dev/sda1 on /
/dev/sdb6 on /mntX
/dev/sdb7 on /mntY
.P
.in +4n
.EX
-# \fBmount \-\-rbind / /home/cecilia/\fP
-# \fBmount | awk \[aq]{print $1, $2, $3}\[aq]\fP
+.RB # " mount \-\-rbind / /home/cecilia/"
+.RB # " mount | awk \[aq]{print $1, $2, $3}\[aq]"
/dev/sda1 on /
/dev/sdb6 on /mntX
/dev/sdb7 on /mntY
.P
.in +4n
.EX
-# \fBmount \-\-rbind / /home/henry\fP
-# \fBmount | awk \[aq]{print $1, $2, $3}\[aq]\fP
+.RB # " mount \-\-rbind / /home/henry"
+.RB # " mount | awk \[aq]{print $1, $2, $3}\[aq]"
/dev/sda1 on /
/dev/sdb6 on /mntX
/dev/sdb7 on /mntY
.P
.in +4n
.EX
-# \fBmount \-\-rbind / /home/otto\fP
-# \fBmount | awk \[aq]{print $1, $2, $3}\[aq]\fP
+.RB # " mount \-\-rbind / /home/otto"
+.RB # " mount | awk \[aq]{print $1, $2, $3}\[aq]"
/dev/sda1 on /
/dev/sdb6 on /mntX
/dev/sdb7 on /mntY
.P
.in +4n
.EX
-# \fBmount \-\-rbind \-\-make\-unbindable / /home/cecilia\fP
+.RB # " mount \-\-rbind \-\-make\-unbindable / /home/cecilia"
.EE
.in
.P
.P
.in +4n
.EX
-# \fBmkdir /mntZ\fP
-# \fBmount \-\-bind /home/cecilia /mntZ\fP
+.RB # " mkdir /mntZ"
+.RB # " mount \-\-bind /home/cecilia /mntZ"
mount: wrong fs type, bad option, bad superblock on /home/cecilia,
missing codepage or helper program, or other error
\&
.P
.in +4n
.EX
-# \fBmount \-\-rbind \-\-make\-unbindable / /home/henry\fP
-# \fBmount \-\-rbind \-\-make\-unbindable / /home/otto\fP
+.RB # " mount \-\-rbind \-\-make\-unbindable / /home/henry"
+.RB # " mount \-\-rbind \-\-make\-unbindable / /home/otto"
.EE
.in
.P
.P
.in +4n
.EX
-# \fBmount | awk \[aq]{print $1, $2, $3}\[aq]\fP
+.RB # " mount | awk \[aq]{print $1, $2, $3}\[aq]"
/dev/sda1 on /
/dev/sdb6 on /mntX
/dev/sdb7 on /mntY
.P
.in +4n
.EX
-# \fBmkdir \-p /mnt/proc\fP
-# \fBmount \-\-bind / /mnt\fP
-# \fBmount \-\-bind /proc /mnt/proc\fP
+.RB # " mkdir \-p /mnt/proc"
+.RB # " mount \-\-bind / /mnt"
+.RB # " mount \-\-bind /proc /mnt/proc"
.EE
.in
.P
.P
.in +4n
.EX
-# \fBmount \-\-make\-private /mnt\fP # Isolate from any previous peer group
-# \fBmount \-\-make\-shared /mnt\fP
-# \fBcat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB # " mount \-\-make\-private /mnt" " # Isolate from any previous peer group"
+.RB # " mount \-\-make\-shared /mnt"
+.RB # " cat /proc/self/mountinfo | grep \[aq]/mnt\[aq] | sed \[aq]s/ \- .*//\[aq]"
239 61 8:2 / /mnt ... shared:102
248 239 0:4 / /mnt/proc ... shared:5
.EE
.P
.in +4n
.EX
-# \fBmkdir \-p /tmp/etc\fP
-# \fBmount \-\-bind /mnt/etc /tmp/etc\fP
-# \fBcat /proc/self/mountinfo | egrep \[aq]/mnt|/tmp/\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB # " mkdir \-p /tmp/etc"
+.RB # " mount \-\-bind /mnt/etc /tmp/etc"
+.RB # " cat /proc/self/mountinfo | egrep \[aq]/mnt|/tmp/\[aq] | sed \[aq]s/ \- .*//\[aq]"
239 61 8:2 / /mnt ... shared:102
248 239 0:4 / /mnt/proc ... shared:5
267 40 8:2 /etc /tmp/etc ... shared:102
.P
.in +4n
.EX
-# \fBmount \-\-make\-slave /tmp/etc\fP
-# \fBmount \-\-make\-shared /tmp/etc\fP
-# \fBcat /proc/self/mountinfo | egrep \[aq]/mnt|/tmp/\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB # " mount \-\-make\-slave /tmp/etc"
+.RB # " mount \-\-make\-shared /tmp/etc"
+.RB # " cat /proc/self/mountinfo | egrep \[aq]/mnt|/tmp/\[aq] | sed \[aq]s/ \- .*//\[aq]"
239 61 8:2 / /mnt ... shared:102
248 239 0:4 / /mnt/proc ... shared:5
267 40 8:2 /etc /tmp/etc ... shared:105 master:102
.P
.in +4n
.EX
-# \fBmkdir \-p /mnt/tmp/etc\fP
-# \fBmount \-\-bind /tmp/etc /mnt/tmp/etc\fP
-# \fBmount \-\-make\-slave /mnt/tmp/etc\fP
-# \fBcat /proc/self/mountinfo | egrep \[aq]/mnt|/tmp/\[aq] | sed \[aq]s/ \- .*//\[aq]\fP
+.RB # " mkdir \-p /mnt/tmp/etc"
+.RB # " mount \-\-bind /tmp/etc /mnt/tmp/etc"
+.RB # " mount \-\-make\-slave /mnt/tmp/etc"
+.RB # " cat /proc/self/mountinfo | egrep \[aq]/mnt|/tmp/\[aq] | sed \[aq]s/ \- .*//\[aq]"
239 61 8:2 / /mnt ... shared:102
248 239 0:4 / /mnt/proc ... shared:5
267 40 8:2 /etc /tmp/etc ... shared:105 master:102
.P
.in +4n
.EX
-# \fBchroot /mnt\fP
+.RB # " chroot /mnt"
.EE
.in
.P
.P
.in +4n
.EX
-# \fBcat /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]\fP
+.RB # " cat /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]"
239 61 8:2 / / ... shared:102
248 239 0:4 / /proc ... shared:5
273 239 8:2 /etc /tmp/etc ... master:105 propagate_from:102
.IP
.in +4n
.EX
-$ \fBsudo sh\fP
-# \fBmount \-\-bind /dev/null /etc/shadow\fP
-# \fBcat /etc/shadow\fP # Produces no output
+.RB $ " sudo sh"
+.RB # " mount \-\-bind /dev/null /etc/shadow"
+.RB # " cat /etc/shadow" " # Produces no output"
.EE
.in
.IP
.IP
.in +4n
.EX
-# \fBunshare \-\-user \-\-map\-root\-user \-\-mount \[rs]\fP
- \fBstrace \-o /tmp/log \[rs]\fP
- \fBumount /etc/shadow\fP
+.RB # " unshare \-\-user \-\-map\-root\-user \-\-mount \[rs]"
+.B " strace \-o /tmp/log \[rs]"
+.B " umount /etc/shadow"
umount: /etc/shadow: not mounted.
-# \fBgrep \[aq]\[ha]umount\[aq] /tmp/log\fP
+.RB # " grep \[aq]\[ha]umount\[aq] /tmp/log"
umount2("/etc/shadow", 0) = \-1 EINVAL (Invalid argument)
.EE
.in
.IP
.in +4n
.EX
-# \fBecho \[aq]aaaaa\[aq] > /tmp/a\fP # File to mount onto /etc/shadow
-# \fBunshare \-\-user \-\-map\-root\-user \-\-mount \[rs]\fP
- \fBsh \-c \[aq]mount \-\-bind /tmp/a /etc/shadow; cat /etc/shadow\[aq]\fP
+.RB # " echo \[aq]aaaaa\[aq] > /tmp/a" " # File to mount onto /etc/shadow"
+.RB # " unshare \-\-user \-\-map\-root\-user \-\-mount \[rs]"
+.B " sh \-c \[aq]mount \-\-bind /tmp/a /etc/shadow; cat /etc/shadow\[aq]"
aaaaa
-# \fBumount /etc/shadow\fP
+.RB # " umount /etc/shadow"
.EE
.in
.IP
.IP
.in +4n
.EX
-$ \fBPS1=\[aq]ns1# \[aq] sudo unshare \-\-user \-\-map\-root\-user \[rs]\fP
- \fB\-\-mount \-\-propagation private bash\fP
-ns1# \fBecho $$\fP # We need the PID of this shell later
+.RB $ " PS1=\[aq]ns1# \[aq] sudo unshare \-\-user \-\-map\-root\-user \[rs]"
+.B " \-\-mount \-\-propagation private bash"
+.RB ns1# " echo $$" " # We need the PID of this shell later"
778501
-ns1# \fBmount \-\-make\-shared \-\-bind /mnt /mnt\fP
-ns1# \fBmkdir /mnt/x\fP
-ns1# \fBmount \-\-make\-private \-t tmpfs none /mnt/x\fP
-ns1# \fBmkdir /mnt/x/y\fP
-ns1# \fBmount \-\-make\-private \-t tmpfs none /mnt/x/y\fP
-ns1# \fBgrep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]\fP
+.RB ns1# " mount \-\-make\-shared \-\-bind /mnt /mnt"
+.RB ns1# " mkdir /mnt/x"
+.RB ns1# " mount \-\-make\-private \-t tmpfs none /mnt/x"
+.RB ns1# " mkdir /mnt/x/y"
+.RB ns1# " mount \-\-make\-private \-t tmpfs none /mnt/x/y"
+.RB ns1# " grep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]"
986 83 8:5 /mnt /mnt rw,relatime shared:344
989 986 0:56 / /mnt/x rw,relatime
990 989 0:57 / /mnt/x/y rw,relatime
.IP
.in +4n
.EX
-ns1# \fBPS1=\[aq]ns2# \[aq] unshare \-\-user \-\-map\-root\-user \[rs]\fP
- \fB\-\-mount \-\-propagation unchanged bash\fP
-ns2# \fBgrep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]\fP
+.RB ns1# " PS1=\[aq]ns2# \[aq] unshare \-\-user \-\-map\-root\-user \[rs]"
+.B " \-\-mount \-\-propagation unchanged bash"
+.RB ns2# " grep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]"
1239 1204 8:5 /mnt /mnt rw,relatime master:344
1240 1239 0:56 / /mnt/x rw,relatime
1241 1240 0:57 / /mnt/x/y rw,relatime
.IP
.in +4n
.EX
-$ \fBPS1=\[aq]ns3# \[aq] sudo nsenter \-t 778501 \-\-user \-\-mount\fP
-ns3# \fBmount \-\-rbind \-\-make\-private /mnt/x /mnt/ppp\fP
-ns3# \fBgrep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]\fP
+.RB $ " PS1=\[aq]ns3# \[aq] sudo nsenter \-t 778501 \-\-user \-\-mount"
+.RB ns3# " mount \-\-rbind \-\-make\-private /mnt/x /mnt/ppp"
+.RB ns3# " grep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]"
986 83 8:5 /mnt /mnt rw,relatime shared:344
989 986 0:56 / /mnt/x rw,relatime
990 989 0:57 / /mnt/x/y rw,relatime
.IP
.in +4n
.EX
-ns2# \fBgrep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]\fP
+.RB ns2# " grep /mnt /proc/self/mountinfo | sed \[aq]s/ \- .*//\[aq]"
1239 1204 8:5 /mnt /mnt rw,relatime master:344
1240 1239 0:56 / /mnt/x rw,relatime
1241 1240 0:57 / /mnt/x/y rw,relatime
.IP
.in +4n
.EX
-ns2# \fBumount /mnt/ppp/y\fP
+.RB ns2# " umount /mnt/ppp/y"
umount: /mnt/ppp/y: not mounted.
-ns2# \fBumount \-l /mnt/ppp | sed \[aq]s/ \- .*//\[aq]\fP # Succeeds...
-ns2# \fBgrep /mnt /proc/self/mountinfo\fP
+.RB ns2# " umount \-l /mnt/ppp | sed \[aq]s/ \- .*//\[aq]" " # Succeeds..."
+.RB ns2# " grep /mnt /proc/self/mountinfo"
1239 1204 8:5 /mnt /mnt rw,relatime master:344
1240 1239 0:56 / /mnt/x rw,relatime
1241 1240 0:57 / /mnt/x/y rw,relatime
.IP
.in +4n
.EX
-$ \fBsudo mkdir /mnt/dir\fP
-$ \fBsudo mount \-\-bind \-o ro /some/path /mnt/dir\fP
-$ \fBsudo unshare \-\-user \-\-map\-root\-user \-\-mount \[rs]\fP
- \fBmount \-o remount,rw /mnt/dir\fP
+.RB $ " sudo mkdir /mnt/dir"
+.RB $ " sudo mount \-\-bind \-o ro /some/path /mnt/dir"
+.RB $ " sudo unshare \-\-user \-\-map\-root\-user \-\-mount \[rs]"
+.B " mount \-o remount,rw /mnt/dir"
mount: /mnt/dir: permission denied.
.EE
.in
l lB lw(21n) lx.
Namespace Flag Page Isolates
_
-Cgroup CLONE_NEWCGROUP \fBcgroup_namespaces\fP(7) T{
+Cgroup CLONE_NEWCGROUP \f[B]cgroup_namespaces\f[](7) T{
.na
.nh
Cgroup root directory
T}
-IPC CLONE_NEWIPC \fBipc_namespaces\fP(7) T{
+IPC CLONE_NEWIPC \f[B]ipc_namespaces\f[](7) T{
.na
.nh
System V IPC,
POSIX message queues
T}
-Network CLONE_NEWNET \fBnetwork_namespaces\fP(7) T{
+Network CLONE_NEWNET \f[B]network_namespaces\f[](7) T{
.na
.nh
Network devices,
stacks, ports, etc.
T}
-Mount CLONE_NEWNS \fBmount_namespaces\fP(7) Mount points
-PID CLONE_NEWPID \fBpid_namespaces\fP(7) Process IDs
-Time CLONE_NEWTIME \fBtime_namespaces\fP(7) T{
+Mount CLONE_NEWNS \f[B]mount_namespaces\f[](7) Mount points
+PID CLONE_NEWPID \f[B]pid_namespaces\f[](7) Process IDs
+Time CLONE_NEWTIME \f[B]time_namespaces\f[](7) T{
.na
.nh
Boot and monotonic clocks
T}
-User CLONE_NEWUSER \fBuser_namespaces\fP(7) T{
+User CLONE_NEWUSER \f[B]user_namespaces\f[](7) T{
User and group IDs
T}
-UTS CLONE_NEWUTS \fButs_namespaces\fP(7) T{
+UTS CLONE_NEWUTS \f[B]uts_namespaces\f[](7) T{
.na
.nh
Hostname and NIS domain name
.\"
.\" ==================== The /proc/[pid]/ns/ directory ====================
.\"
-.SS The \fI/proc/\fPpid\fI/ns/\fP directory
+.SS The \f[I]/proc/\f[]pid\f[I]/ns/\f[] directory
Each process has a
.IR /proc/ pid /ns/
.\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
.P
.in +4n
.EX
-$ \fBls \-l /proc/$$/ns | awk \[aq]{print $1, $9, $10, $11}\[aq]\fP
+.RB $ " ls \-l /proc/$$/ns | awk \[aq]{print $1, $9, $10, $11}\[aq]"
total 0
lrwxrwxrwx. cgroup \-> cgroup:[4026531835]
lrwxrwxrwx. ipc \-> ipc:[4026531839]
.P
.in +4n
.EX
-$ \fBreadlink /proc/$$/ns/uts\fP
+.RB $ " readlink /proc/$$/ns/uts"
uts:[4026531838]
.EE
.in
.\"
.\" ==================== The /proc/sys/user directory ====================
.\"
-.SS The \fI/proc/sys/user\fP directory
+.SS The \f[I]/proc/sys/user\f[] directory
The files in the
.I /proc/sys/user
directory (which is present since Linux 4.9) expose limits
tab(:);
l s
lB lx.
-Standard flag bits in \fInlmsg_flags\fP
+Standard flag bits in \f[I]nlmsg_flags\f[]
_
NLM_F_REQUEST:T{
Must be set on all request messages.
However, applications should normally use the interface provided by
.IR libnuma ;
see "Library Support" below.
-.SS \fI/proc/\fPpid\fI/numa_maps\fP (since Linux 2.6.14)
+.SS \f[I]/proc/\f[]pid\f[I]/numa_maps\f[] (since Linux 2.6.14)
.\" See also Changelog-2.6.14
This file displays information about a process's
NUMA memory policy and allocation.
.B CONFIG_NUMA
option.
.SS Library support
-Link with \fI\-lnuma\fP
+Link with
+.I \-lnuma
to get the system call definitions.
.I libnuma
and the required
.IR n ,
the number of bytes to be written:
.TP
-\fBO_NONBLOCK\fP disabled, \fIn\fP <= \fBPIPE_BUF\fP
+.BR O_NONBLOCK " disabled, \f[I]n\f[] <= " PIPE_BUF
All
.I n
bytes are written atomically;
.I n
bytes to be written immediately
.TP
-\fBO_NONBLOCK\fP enabled, \fIn\fP <= \fBPIPE_BUF\fP
+.BR O_NONBLOCK " enabled, \f[I]n\f[] <= " PIPE_BUF
If there is room to write
.I n
bytes to the pipe, then
set to
.BR EAGAIN .
.TP
-\fBO_NONBLOCK\fP disabled, \fIn\fP > \fBPIPE_BUF\fP
+.BR O_NONBLOCK " disabled, \f[I]n\f[] > " PIPE_BUF
The write is nonatomic: the data given to
.BR write (2)
may be interleaved with
.I n
bytes have been written.
.TP
-\fBO_NONBLOCK\fP enabled, \fIn\fP > \fBPIPE_BUF\fP
+.BR O_NONBLOCK " enabled, \f[I]n\f[] > " PIPE_BUF
If the pipe is full, then
.BR write (2)
fails, with
.P
From the
.BR keyctl (1)
-utility, '\fB@p\fP' can be used instead of a numeric key ID in
+utility,
+.RB ' @p '
+can be used instead of a numeric key ID in
much the same way, but since
.BR keyctl (1)
is a program run after forking, this is of no utility.
.in
.SS Selecting the threading implementation: LD_ASSUME_KERNEL
On systems with a glibc that supports both LinuxThreads and NPTL
-(i.e., glibc 2.3.\fIx\fP), the
+(i.e., glibc 2.3.*), the
.B LD_ASSUME_KERNEL
environment variable can be used to override
the dynamic linker's default choice of threading implementation.
tab(:) allbox;
c s
l l.
-IP Header fields modified on sending by \fBIP_HDRINCL\fP
+IP Header fields modified on sending by \f[B]IP_HDRINCL\f[]
IP Checksum:Always filled in
Source Address:Filled in when zero
Packet ID:Filled in when zero
"\*(dg" marks decisions on these aspects that
may not be fully portable to other POSIX.2 implementations.
.P
-A (modern) RE is one\*(dg or more nonempty\*(dg \fIbranches\fR,
+A (modern) RE is one\*(dg or more nonempty\*(dg
+.IR branches ,
separated by \[aq]|\[aq].
It matches anything that matches one of the branches.
.P
-A branch is one\*(dg or more \fIpieces\fR, concatenated.
+A branch is one\*(dg or more
+.IR pieces ,
+concatenated.
It matches a match for the first, followed by a match for the second,
and so on.
.P
-A piece is an \fIatom\fR possibly followed
-by a single\*(dg \[aq]*\[aq], \[aq]+\[aq], \[aq]?\[aq], or \fIbound\fR.
+A piece is an
+.I atom
+possibly followed
+by a single\*(dg \[aq]*\[aq], \[aq]+\[aq], \[aq]?\[aq], or
+.IR bound .
An atom followed by \[aq]*\[aq]
matches a sequence of 0 or more matches of the atom.
An atom followed by \[aq]+\[aq]
An atom followed by \[aq]?\[aq]
matches a sequence of 0 or 1 matches of the atom.
.P
-A \fIbound\fR is \[aq]{\[aq] followed by an unsigned decimal integer,
+A
+.I bound
+is \[aq]{\[aq] followed by an unsigned decimal integer,
possibly followed by \[aq],\[aq]
possibly followed by another unsigned decimal integer,
always followed by \[aq]}\[aq].
.B RE_DUP_MAX
(255\*(dg) inclusive,
and if there are two of them, the first may not exceed the second.
-An atom followed by a bound containing one integer \fIi\fR
+An atom followed by a bound containing one integer
+.I i
and no comma matches
-a sequence of exactly \fIi\fR matches of the atom.
+a sequence of exactly
+.I i
+matches of the atom.
An atom followed by a bound
-containing one integer \fIi\fR and a comma matches
-a sequence of \fIi\fR or more matches of the atom.
+containing one integer
+.I i
+and a comma matches
+a sequence of
+.I i
+or more matches of the atom.
An atom followed by a bound
-containing two integers \fIi\fR and \fIj\fR matches
-a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom.
+containing two integers
+.I i
+and
+.I j
+matches
+a sequence of
+.I i
+through
+.I j
+(inclusive) matches of the atom.
.P
-An atom is a regular expression enclosed in "\fI()\fP"
+An atom is a regular expression enclosed in
+.RI \[dq] () \[dq]
(matching a match for the regular expression),
-an empty set of "\fI()\fP" (matching the null string)\*(dg,
-a \fIbracket expression\fR (see below),
+an empty set of
+.RI \[dq] () \[dq]
+(matching the null string)\*(dg,
+a
+.I bracket expression
+(see below),
\[aq].\[aq] (matching any single character),
\[aq]\[ha]\[aq] (matching the null string at the beginning of a line),
\[aq]$\[aq] (matching the null string at the end of a line),
-a \[aq]\[rs]\[aq] followed by one of the characters "\fI\[ha].[$()|*+?{\[rs]\fP"
+a \[aq]\[rs]\[aq] followed by one of the characters
+.RI \[dq] \[ha].[$()|*+?{\[rs] \[dq]
(matching that character taken as an ordinary character),
a \[aq]\[rs]\[aq] followed by any other character\*(dg
(matching that character taken as an ordinary character,
not the beginning of a bound\*(dg.
It is illegal to end an RE with \[aq]\[rs]\[aq].
.P
-A \fIbracket expression\fR is a list of characters enclosed in "\fI[]\fP".
+A
+.I bracket expression
+is a list of characters enclosed in
+.RI \[dq] [] \[dq].
It normally matches any single character from the list (but see below).
If the list begins with \[aq]\[ha]\[aq],
it matches any single character
-(but see below) \fInot\fR from the rest of the list.
+(but see below)
+.I not
+from the rest of the list.
If two characters in the list are separated by \[aq]\-\[aq], this is shorthand
-for the full \fIrange\fR of characters between those two (inclusive) in the
+for the full
+.I range
+of characters between those two (inclusive) in the
collating sequence,
-for example, "\fI[0\-9]\fP" in ASCII matches any decimal digit.
+for example,
+.RI \[dq] [0\-9] \[dq]
+in ASCII matches any decimal digit.
It is illegal\*(dg for two ranges to share an
-endpoint, for example, "\fIa\-c\-e\fP".
+endpoint, for example,
+.RI \[dq] a\-c\-e \[dq].
Ranges are very collating-sequence-dependent,
and portable programs should avoid relying on them.
.P
To include a literal \[aq]\-\[aq], make it the first or last character,
or the second endpoint of a range.
To use a literal \[aq]\-\[aq] as the first endpoint of a range,
-enclose it in "\fI[.\fP" and "\fI.]\fP"
+enclose it in
+.RI \[dq] [. \[dq]
+and
+.RI \[dq] .] \[dq]
to make it a collating element (see below).
With the exception of these and some combinations using \[aq][\[aq] (see next
paragraphs), all other special characters, including \[aq]\[rs]\[aq], lose their
Within a bracket expression, a collating element (a character,
a multicharacter sequence that collates as if it were a single character,
or a collating-sequence name for either)
-enclosed in "\fI[.\fP" and "\fI.]\fP" stands for the
+enclosed in
+.RI \[dq] [. \[dq]
+and
+.RI \[dq] .] \[dq]
+stands for the
sequence of characters of that collating element.
The sequence is a single element of the bracket expression's list.
A bracket expression containing a multicharacter collating element
can thus match more than one character,
for example, if the collating sequence includes a "ch" collating element,
-then the RE "\fI[[.ch.]]*c\fP" matches the first five characters
-of "chchcc".
+then the RE
+.RI \[dq] [[.ch.]]*c \[dq]
+matches the first five characters of "chchcc".
.P
-Within a bracket expression, a collating element enclosed in "\fI[=\fP" and
-"\fI=]\fP" is an equivalence class, standing for the sequences of characters
+Within a bracket expression, a collating element enclosed in
+.RI \[dq] [= \[dq]
+and
+.RI \[dq] =] \[dq]
+is an equivalence class, standing for the sequences of characters
of all collating elements equivalent to that one, including itself.
(If there are no other equivalent collating elements,
the treatment is as if the enclosing delimiters
-were "\fI[.\fP" and "\fI.]\fP".)
+were
+.RI \[dq] [. \[dq]
+and
+.RI \[dq] .] \[dq].)
For example, if o and \(^o are the members of an equivalence class,
-then "\fI[[=o=]]\fP", "\fI[[=\(^o=]]\fP",
-and "\fI[o\(^o]\fP" are all synonymous.
+then
+.RI \[dq] [[=o=]] \[dq],
+.RI \[dq] [[=\(^o=]] \[dq],
+and
+.RI \[dq] [o\(^o] \[dq]
+are all synonymous.
An equivalence class may not\*(dg be an endpoint
of a range.
.P
-Within a bracket expression, the name of a \fIcharacter class\fR enclosed
-in "\fI[:\fP" and "\fI:]\fP" stands for the list
-of all characters belonging to that
-class.
+Within a bracket expression,
+the name of a
+.I character class
+enclosed in
+.RI \[dq] [: \[dq]
+and
+.RI \[dq] :] \[dq]
+stands for the list of all characters belonging to that class.
Standard character class names are:
.P
.RS
.\" The following does not seem to apply in the glibc implementation
.\" .P
.\" There are two special cases\*(dg of bracket expressions:
-.\" the bracket expressions "\fI[[:<:]]\fP" and "\fI[[:>:]]\fP" match
-.\" the null string at the beginning and end of a word respectively.
+.\" the bracket expressions
+.\" .RI \[dq] [[:<:]] \[dq]
+.\" and
+.\" .RI \[dq] [[:>:]] \[dq]
+.\" match the null string at the beginning and end of a word respectively.
.\" A word is defined as a sequence of
.\" word characters
.\" which is neither preceded nor followed by
Match lengths are measured in characters, not collating elements.
A null string is considered longer than no match at all.
For example,
-"\fIbb*\fP" matches the three middle characters of "abbbc",
-"\fI(wee|week)(knights|nights)\fP"
+.RI \[dq] bb* \[dq]
+matches the three middle characters of "abbbc",
+.RI \[dq] (wee|week)(knights|nights) \[dq]
matches all ten characters of "weeknights",
-when "\fI(.*).*\fP" is matched against "abc" the parenthesized subexpression
+when
+.RI \[dq] (.*).* \[dq]
+is matched against "abc" the parenthesized subexpression
matches all three characters, and
-when "\fI(a*)*\fP" is matched against "bc"
+when
+.RI \[dq] (a*)* \[dq]
+is matched against "bc"
both the whole RE and the parenthesized
subexpression match the null string.
.P
When an alphabetic that exists in multiple cases appears as an
ordinary character outside a bracket expression, it is effectively
transformed into a bracket expression containing both cases,
-for example, \[aq]x\[aq] becomes "\fI[xX]\fP".
+for example, \[aq]x\[aq] becomes
+.RI \[dq] [xX] \[dq].
When it appears inside a bracket expression, all case counterparts
-of it are added to the bracket expression, so that, for example, "\fI[x]\fP"
-becomes "\fI[xX]\fP" and "\fI[\[ha]x]\fP" becomes "\fI[\[ha]xX]\fP".
+of it are added to the bracket expression, so that, for example,
+.RI \[dq] [x] \[dq]
+becomes
+.RI \[dq] [xX] \[dq]
+and
+.RI \[dq] [\[ha]x] \[dq]
+becomes
+.RI \[dq] [\[ha]xX] \[dq].
.P
No particular limit is imposed on the length of REs\*(dg.
Programs intended to be portable should not employ REs longer
\[aq]|\[aq], \[aq]+\[aq], and \[aq]?\[aq] are
ordinary characters and there is no equivalent
for their functionality.
-The delimiters for bounds are "\fI\[rs]{\fP" and "\fI\[rs]}\fP",
+The delimiters for bounds are
+.RI \[dq] \[rs]{ \[dq]
+and
+.RI \[dq] \[rs]} \[dq],
with \[aq]{\[aq] and \[aq]}\[aq] by themselves ordinary characters.
-The parentheses for nested subexpressions are "\fI\[rs](\fP" and "\fI\[rs])\fP",
+The parentheses for nested subexpressions are
+.RI \[dq] \[rs]( \[dq]
+and
+.RI \[dq] \[rs]) \[dq],
with \[aq](\[aq] and \[aq])\[aq] by themselves ordinary characters.
\[aq]\[ha]\[aq] is an ordinary character except at the beginning of the
RE or\*(dg the beginning of a parenthesized subexpression,
RE or the beginning of a parenthesized subexpression
(after a possible leading \[aq]\[ha]\[aq]).
.P
-Finally, there is one new type of atom, a \fIback reference\fR:
-\[aq]\[rs]\[aq] followed by a nonzero decimal digit \fId\fR
+Finally, there is one new type of atom, a
+.IR "back reference" :
+\[aq]\[rs]\[aq] followed by a nonzero decimal digit
+.I d
matches the same sequence of characters
-matched by the \fId\fRth parenthesized subexpression
+matched by the
+.IR d th
+parenthesized subexpression
(numbering subexpressions by the positions of their opening parentheses,
left to right),
so that, for example,
-.I \[dq]\[rs]([bc]\[rs])\[rs]1\[dq]
-matches
-.I \[dq]bb\[dq]
-or
-.I \[dq]cc\[dq]
-but not
-.IR \[dq]bc\[dq] .
+.RI \[dq] \[rs]([bc]\[rs])\[rs]1 \[dq]
+matches "bb" or "cc" but not "bc".
.SH BUGS
Having two kinds of REs is a botch.
.P
posing major problems for efficient implementations.
They are also somewhat vaguely defined
(does
-"\fIa\[rs](\[rs](b\[rs])*\[rs]2\[rs])*d\fP" match "abbbd"?).
+.RI \[dq] a\[rs](\[rs](b\[rs])*\[rs]2\[rs])*d \[dq]
+match "abbbd"?).
Avoid using them.
.P
POSIX.2's specification of case-independent matching is vague.
.SS Scheduling policies
The scheduler is the kernel component that decides which runnable thread
will be executed by the CPU next.
-Each thread has an associated scheduling policy and a \fIstatic\fP
+Each thread has an associated scheduling policy and a
+.I static
scheduling priority,
.IR sched_priority .
The scheduler makes its decisions based on knowledge of the scheduling
policy and static priority of all threads on the system.
.P
For threads scheduled under one of the normal scheduling policies
-(\fBSCHED_OTHER\fP, \fBSCHED_IDLE\fP, \fBSCHED_BATCH\fP),
-\fIsched_priority\fP is not used in scheduling
-decisions (it must be specified as 0).
+.RB ( SCHED_OTHER ,
+.BR SCHED_IDLE ,
+.BR SCHED_BATCH ),
+.I sched_priority
+is not used in scheduling decisions
+(it must be specified as 0).
.P
Processes scheduled under one of the real-time policies
-(\fBSCHED_FIFO\fP, \fBSCHED_RR\fP) have a
-\fIsched_priority\fP value in the range 1 (low) to 99 (high).
+.RB ( SCHED_FIFO ,
+.BR SCHED_RR )
+have a
+.I sched_priority
+value in the range 1 (low) to 99 (high).
(As the numbers imply, real-time threads always have higher priority
than normal threads.)
Note well: POSIX.1 requires an implementation to support only a
.BR sched_get_priority_max (2)
to find the range of priorities supported for a particular policy.
.P
-Conceptually, the scheduler maintains a list of runnable
-threads for each possible \fIsched_priority\fP value.
+Conceptually,
+the scheduler maintains a list of runnable threads for each possible
+.I sched_priority
+value.
In order to determine which thread runs next, the scheduler looks for
the nonempty list with the highest static priority and selects the
thread at the head of this list.
ordering only within the list of runnable threads with equal static
priority.
.SS SCHED_FIFO: First in-first out scheduling
-\fBSCHED_FIFO\fP can be used only with static priorities higher than
-0, which means that when a \fBSCHED_FIFO\fP thread becomes runnable,
+.B SCHED_FIFO
+can be used only with static priorities higher than 0,
+which means that when a
+.B SCHED_FIFO
+thread becomes runnable,
it will always immediately preempt any currently running
-\fBSCHED_OTHER\fP, \fBSCHED_BATCH\fP, or \fBSCHED_IDLE\fP thread.
-\fBSCHED_FIFO\fP is a simple scheduling
+.BR SCHED_OTHER ,
+.BR SCHED_BATCH ,
+or
+.B SCHED_IDLE
+thread.
+.B SCHED_FIFO is a simple scheduling
algorithm without time slicing.
For threads scheduled under the
-\fBSCHED_FIFO\fP policy, the following rules apply:
+.B SCHED_FIFO
+policy,
+the following rules apply:
.IP \[bu] 3
-A running \fBSCHED_FIFO\fP thread that has been preempted by another thread of
-higher priority will stay at the head of the list for its priority and
-will resume execution as soon as all threads of higher priority are
-blocked again.
+A running
+.B SCHED_FIFO
+thread that has been preempted by another thread of higher priority
+will stay at the head of the list for its priority and
+will resume execution
+as soon as all threads of higher priority are blocked again.
.IP \[bu]
-When a blocked \fBSCHED_FIFO\fP thread becomes runnable, it
-will be inserted at the end of the list for its priority.
+When a blocked
+.B SCHED_FIFO
+thread becomes runnable,
+it will be inserted at the end of the list for its priority.
.IP \[bu]
If a call to
.BR sched_setscheduler (2),
will be put at the end of the list.
.P
No other events will move a thread
-scheduled under the \fBSCHED_FIFO\fP policy in the wait list of
+scheduled under the
+.B SCHED_FIFO
+policy in the wait list of
runnable threads with equal static priority.
.P
-A \fBSCHED_FIFO\fP
-thread runs until either it is blocked by an I/O request, it is
-preempted by a higher priority thread, or it calls
+A
+.B SCHED_FIFO
+thread runs until either
+it is blocked by an I/O request,
+it is preempted by a higher priority thread,
+or it calls
.BR sched_yield (2).
.SS SCHED_RR: Round-robin scheduling
-\fBSCHED_RR\fP is a simple enhancement of \fBSCHED_FIFO\fP.
-Everything
-described above for \fBSCHED_FIFO\fP also applies to \fBSCHED_RR\fP,
-except that each thread is allowed to run only for a maximum time
-quantum.
-If a \fBSCHED_RR\fP thread has been running for a time
-period equal to or longer than the time quantum, it will be put at the
-end of the list for its priority.
-A \fBSCHED_RR\fP thread that has
-been preempted by a higher priority thread and subsequently resumes
-execution as a running thread will complete the unexpired portion of
-its round-robin time quantum.
+.B SCHED_RR
+is a simple enhancement of
+.BR SCHED_FIFO .
+Everything described above for
+.B SCHED_FIFO
+also applies to
+.BR SCHED_RR ,
+except that each thread is allowed to run only for a maximum time quantum.
+If a
+.B SCHED_RR
+thread has been running for a time period
+equal to or longer than the time quantum,
+it will be put at the end of the list for its priority.
+A
+.B SCHED_RR
+thread that has
+been preempted by a higher priority thread
+and subsequently resumes execution as a running thread
+will complete the unexpired portion of its round-robin time quantum.
The length of the time quantum can be
retrieved using
.BR sched_rr_get_interval (2).
.\" Is that intended? (Why?)
.\"
.SS SCHED_OTHER: Default Linux time-sharing scheduling
-\fBSCHED_OTHER\fP can be used at only static priority 0
+.B SCHED_OTHER
+can be used at only static priority 0
(i.e., threads under real-time policies always have priority over
.B SCHED_OTHER
processes).
-\fBSCHED_OTHER\fP is the standard Linux time-sharing scheduler that is
-intended for all threads that do not require the special
-real-time mechanisms.
+.B SCHED_OTHER
+is the standard Linux time-sharing scheduler that is
+intended for all threads that
+do not require the special real-time mechanisms.
.P
-The thread to run is chosen from the static
-priority 0 list based on a \fIdynamic\fP priority that is determined only
+The thread to run is chosen from the static priority 0 list
+based on a
+.I dynamic
+priority that is determined only
inside this list.
The dynamic priority is based on the nice value (see below)
and is increased for each time quantum the thread is ready to run,
but denied to run by the scheduler.
-This ensures fair progress among all \fBSCHED_OTHER\fP threads.
+This ensures fair progress among all
+.B SCHED_OTHER
+threads.
.P
In the Linux kernel source code, the
.B SCHED_OTHER
.\"
.SS SCHED_BATCH: Scheduling batch processes
(Since Linux 2.6.16.)
-\fBSCHED_BATCH\fP can be used only at static priority 0.
-This policy is similar to \fBSCHED_OTHER\fP in that it schedules
-the thread according to its dynamic priority
+.B SCHED_BATCH
+can be used only at static priority 0.
+This policy is similar to
+.B SCHED_OTHER
+in that it schedules the thread according to its dynamic priority
(based on the nice value).
The difference is that this policy
will cause the scheduler to always assume
.\"
.SS SCHED_IDLE: Scheduling very low priority jobs
(Since Linux 2.6.23.)
-\fBSCHED_IDLE\fP can be used only at static priority 0;
+.B SCHED_IDLE
+can be used only at static priority 0;
the process nice value has no influence for this policy.
.P
This policy is intended for running jobs at extremely low
.P
.in +4n
.EX
-$ \fBcat /proc/1/autogroup\fP
+.RB $ " cat /proc/1/autogroup"
/autogroup\-1 nice 0
.EE
.in
.P
.in +4n
.EX
-$ \fBecho 10 > /proc/self/autogroup\fP
+.RB $ " echo 10 > /proc/self/autogroup"
.EE
.in
.SS Real-time features in the mainline Linux kernel
.P
.in +4n
.EX
-patch\-\fIkernelversion\fP\-rt\fIpatchversion\fP
+.RI patch\- kernelversion \-rt patchversion
.EE
.in
.P
normally mounted under
.IR /dev/shm ,
with names of the form
-.IR \fBsem.\fPsomename .
+.IR sem. somename.
(This is the reason that semaphore names are limited to
.BI NAME_MAX \-4
rather than
.P
From the
.BR keyctl (1)
-utility, '\fB@s\fP' can be used instead of a numeric key ID in
-much the same way.
+utility,
+.RB ' @s '
+can be used instead of a numeric key ID in much the same way.
.P
A process's session keyring is inherited across
.BR clone (2),
lb lb
lw(24n) l.
Function Notes
-\fBabort\fP(3) Added in POSIX.1-2001 TC1
-\fBaccept\fP(2)
-\fBaccess\fP(2)
-\fBaio_error\fP(3)
-\fBaio_return\fP(3)
-\fBaio_suspend\fP(3) See notes below
-\fBalarm\fP(2)
-\fBbind\fP(2)
-\fBcfgetispeed\fP(3)
-\fBcfgetospeed\fP(3)
-\fBcfsetispeed\fP(3)
-\fBcfsetospeed\fP(3)
-\fBchdir\fP(2)
-\fBchmod\fP(2)
-\fBchown\fP(2)
-\fBclock_gettime\fP(2)
-\fBclose\fP(2)
-\fBconnect\fP(2)
-\fBcreat\fP(2)
-\fBdup\fP(2)
-\fBdup2\fP(2)
+\f[B]abort\f[](3) Added in POSIX.1-2001 TC1
+\f[B]accept\f[](2)
+\f[B]access\f[](2)
+\f[B]aio_error\f[](3)
+\f[B]aio_return\f[](3)
+\f[B]aio_suspend\f[](3) See notes below
+\f[B]alarm\f[](2)
+\f[B]bind\f[](2)
+\f[B]cfgetispeed\f[](3)
+\f[B]cfgetospeed\f[](3)
+\f[B]cfsetispeed\f[](3)
+\f[B]cfsetospeed\f[](3)
+\f[B]chdir\f[](2)
+\f[B]chmod\f[](2)
+\f[B]chown\f[](2)
+\f[B]clock_gettime\f[](2)
+\f[B]close\f[](2)
+\f[B]connect\f[](2)
+\f[B]creat\f[](2)
+\f[B]dup\f[](2)
+\f[B]dup2\f[](2)
T{
.BR execl (3)
T} T{
Added in POSIX.1-2008; see notes below
T}
-\fBexecle\fP(3) See notes below
-\fBexecv\fP(3) Added in POSIX.1-2008
-\fBexecve\fP(2)
-\fB_exit\fP(2)
-\fB_Exit\fP(2)
-\fBfaccessat\fP(2) Added in POSIX.1-2008
-\fBfchdir\fP(2) Added in POSIX.1-2008 TC1
-\fBfchmod\fP(2)
-\fBfchmodat\fP(2) Added in POSIX.1-2008
-\fBfchown\fP(2)
-\fBfchownat\fP(2) Added in POSIX.1-2008
-\fBfcntl\fP(2)
-\fBfdatasync\fP(2)
-\fBfexecve\fP(3) Added in POSIX.1-2008
-\fBffs\fP(3) Added in POSIX.1-2008 TC2
-\fBfork\fP(2) See notes below
-\fBfstat\fP(2)
-\fBfstatat\fP(2) Added in POSIX.1-2008
-\fBfsync\fP(2)
-\fBftruncate\fP(2)
-\fBfutimens\fP(3) Added in POSIX.1-2008
-\fBgetegid\fP(2)
-\fBgeteuid\fP(2)
-\fBgetgid\fP(2)
-\fBgetgroups\fP(2)
-\fBgetpeername\fP(2)
-\fBgetpgrp\fP(2)
-\fBgetpid\fP(2)
-\fBgetppid\fP(2)
-\fBgetsockname\fP(2)
-\fBgetsockopt\fP(2)
-\fBgetuid\fP(2)
-\fBhtonl\fP(3) Added in POSIX.1-2008 TC2
-\fBhtons\fP(3) Added in POSIX.1-2008 TC2
-\fBkill\fP(2)
-\fBlink\fP(2)
-\fBlinkat\fP(2) Added in POSIX.1-2008
-\fBlisten\fP(2)
+\f[B]execle\f[](3) See notes below
+\f[B]execv\f[](3) Added in POSIX.1-2008
+\f[B]execve\f[](2)
+\f[B]_exit\f[](2)
+\f[B]_Exit\f[](2)
+\f[B]faccessat\f[](2) Added in POSIX.1-2008
+\f[B]fchdir\f[](2) Added in POSIX.1-2008 TC1
+\f[B]fchmod\f[](2)
+\f[B]fchmodat\f[](2) Added in POSIX.1-2008
+\f[B]fchown\f[](2)
+\f[B]fchownat\f[](2) Added in POSIX.1-2008
+\f[B]fcntl\f[](2)
+\f[B]fdatasync\f[](2)
+\f[B]fexecve\f[](3) Added in POSIX.1-2008
+\f[B]ffs\f[](3) Added in POSIX.1-2008 TC2
+\f[B]fork\f[](2) See notes below
+\f[B]fstat\f[](2)
+\f[B]fstatat\f[](2) Added in POSIX.1-2008
+\f[B]fsync\f[](2)
+\f[B]ftruncate\f[](2)
+\f[B]futimens\f[](3) Added in POSIX.1-2008
+\f[B]getegid\f[](2)
+\f[B]geteuid\f[](2)
+\f[B]getgid\f[](2)
+\f[B]getgroups\f[](2)
+\f[B]getpeername\f[](2)
+\f[B]getpgrp\f[](2)
+\f[B]getpid\f[](2)
+\f[B]getppid\f[](2)
+\f[B]getsockname\f[](2)
+\f[B]getsockopt\f[](2)
+\f[B]getuid\f[](2)
+\f[B]htonl\f[](3) Added in POSIX.1-2008 TC2
+\f[B]htons\f[](3) Added in POSIX.1-2008 TC2
+\f[B]kill\f[](2)
+\f[B]link\f[](2)
+\f[B]linkat\f[](2) Added in POSIX.1-2008
+\f[B]listen\f[](2)
T{
.BR longjmp (3)
T} T{
Added in POSIX.1-2008 TC2; see notes below
T}
-\fBlseek\fP(2)
-\fBlstat\fP(2)
-\fBmemccpy\fP(3) Added in POSIX.1-2008 TC2
-\fBmemchr\fP(3) Added in POSIX.1-2008 TC2
-\fBmemcmp\fP(3) Added in POSIX.1-2008 TC2
-\fBmemcpy\fP(3) Added in POSIX.1-2008 TC2
-\fBmemmove\fP(3) Added in POSIX.1-2008 TC2
-\fBmemset\fP(3) Added in POSIX.1-2008 TC2
-\fBmkdir\fP(2)
-\fBmkdirat\fP(2) Added in POSIX.1-2008
-\fBmkfifo\fP(3)
-\fBmkfifoat\fP(3) Added in POSIX.1-2008
-\fBmknod\fP(2) Added in POSIX.1-2008
-\fBmknodat\fP(2) Added in POSIX.1-2008
-\fBntohl\fP(3) Added in POSIX.1-2008 TC2
-\fBntohs\fP(3) Added in POSIX.1-2008 TC2
-\fBopen\fP(2)
-\fBopenat\fP(2) Added in POSIX.1-2008
-\fBpause\fP(2)
-\fBpipe\fP(2)
-\fBpoll\fP(2)
-\fBposix_trace_event\fP(3)
-\fBpselect\fP(2)
-\fBpthread_kill\fP(3) Added in POSIX.1-2008 TC1
-\fBpthread_self\fP(3) Added in POSIX.1-2008 TC1
-\fBpthread_sigmask\fP(3) Added in POSIX.1-2008 TC1
-\fBraise\fP(3)
-\fBread\fP(2)
-\fBreadlink\fP(2)
-\fBreadlinkat\fP(2) Added in POSIX.1-2008
-\fBrecv\fP(2)
-\fBrecvfrom\fP(2)
-\fBrecvmsg\fP(2)
-\fBrename\fP(2)
-\fBrenameat\fP(2) Added in POSIX.1-2008
-\fBrmdir\fP(2)
-\fBselect\fP(2)
-\fBsem_post\fP(3)
-\fBsend\fP(2)
-\fBsendmsg\fP(2)
-\fBsendto\fP(2)
-\fBsetgid\fP(2)
-\fBsetpgid\fP(2)
-\fBsetsid\fP(2)
-\fBsetsockopt\fP(2)
-\fBsetuid\fP(2)
-\fBshutdown\fP(2)
-\fBsigaction\fP(2)
-\fBsigaddset\fP(3)
-\fBsigdelset\fP(3)
-\fBsigemptyset\fP(3)
-\fBsigfillset\fP(3)
-\fBsigismember\fP(3)
+\f[B]lseek\f[](2)
+\f[B]lstat\f[](2)
+\f[B]memccpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]memchr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]memcmp\f[](3) Added in POSIX.1-2008 TC2
+\f[B]memcpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]memmove\f[](3) Added in POSIX.1-2008 TC2
+\f[B]memset\f[](3) Added in POSIX.1-2008 TC2
+\f[B]mkdir\f[](2)
+\f[B]mkdirat\f[](2) Added in POSIX.1-2008
+\f[B]mkfifo\f[](3)
+\f[B]mkfifoat\f[](3) Added in POSIX.1-2008
+\f[B]mknod\f[](2) Added in POSIX.1-2008
+\f[B]mknodat\f[](2) Added in POSIX.1-2008
+\f[B]ntohl\f[](3) Added in POSIX.1-2008 TC2
+\f[B]ntohs\f[](3) Added in POSIX.1-2008 TC2
+\f[B]open\f[](2)
+\f[B]openat\f[](2) Added in POSIX.1-2008
+\f[B]pause\f[](2)
+\f[B]pipe\f[](2)
+\f[B]poll\f[](2)
+\f[B]posix_trace_event\f[](3)
+\f[B]pselect\f[](2)
+\f[B]pthread_kill\f[](3) Added in POSIX.1-2008 TC1
+\f[B]pthread_self\f[](3) Added in POSIX.1-2008 TC1
+\f[B]pthread_sigmask\f[](3) Added in POSIX.1-2008 TC1
+\f[B]raise\f[](3)
+\f[B]read\f[](2)
+\f[B]readlink\f[](2)
+\f[B]readlinkat\f[](2) Added in POSIX.1-2008
+\f[B]recv\f[](2)
+\f[B]recvfrom\f[](2)
+\f[B]recvmsg\f[](2)
+\f[B]rename\f[](2)
+\f[B]renameat\f[](2) Added in POSIX.1-2008
+\f[B]rmdir\f[](2)
+\f[B]select\f[](2)
+\f[B]sem_post\f[](3)
+\f[B]send\f[](2)
+\f[B]sendmsg\f[](2)
+\f[B]sendto\f[](2)
+\f[B]setgid\f[](2)
+\f[B]setpgid\f[](2)
+\f[B]setsid\f[](2)
+\f[B]setsockopt\f[](2)
+\f[B]setuid\f[](2)
+\f[B]shutdown\f[](2)
+\f[B]sigaction\f[](2)
+\f[B]sigaddset\f[](3)
+\f[B]sigdelset\f[](3)
+\f[B]sigemptyset\f[](3)
+\f[B]sigfillset\f[](3)
+\f[B]sigismember\f[](3)
T{
.BR siglongjmp (3)
T} T{
Added in POSIX.1-2008 TC2; see notes below
T}
-\fBsignal\fP(2)
-\fBsigpause\fP(3)
-\fBsigpending\fP(2)
-\fBsigprocmask\fP(2)
-\fBsigqueue\fP(2)
-\fBsigset\fP(3)
-\fBsigsuspend\fP(2)
-\fBsleep\fP(3)
-\fBsockatmark\fP(3) Added in POSIX.1-2001 TC2
-\fBsocket\fP(2)
-\fBsocketpair\fP(2)
-\fBstat\fP(2)
-\fBstpcpy\fP(3) Added in POSIX.1-2008 TC2
-\fBstpncpy\fP(3) Added in POSIX.1-2008 TC2
-\fBstrcat\fP(3) Added in POSIX.1-2008 TC2
-\fBstrchr\fP(3) Added in POSIX.1-2008 TC2
-\fBstrcmp\fP(3) Added in POSIX.1-2008 TC2
-\fBstrcpy\fP(3) Added in POSIX.1-2008 TC2
-\fBstrcspn\fP(3) Added in POSIX.1-2008 TC2
-\fBstrlen\fP(3) Added in POSIX.1-2008 TC2
-\fBstrncat\fP(3) Added in POSIX.1-2008 TC2
-\fBstrncmp\fP(3) Added in POSIX.1-2008 TC2
-\fBstrncpy\fP(3) Added in POSIX.1-2008 TC2
-\fBstrnlen\fP(3) Added in POSIX.1-2008 TC2
-\fBstrpbrk\fP(3) Added in POSIX.1-2008 TC2
-\fBstrrchr\fP(3) Added in POSIX.1-2008 TC2
-\fBstrspn\fP(3) Added in POSIX.1-2008 TC2
-\fBstrstr\fP(3) Added in POSIX.1-2008 TC2
-\fBstrtok_r\fP(3) Added in POSIX.1-2008 TC2
-\fBsymlink\fP(2)
-\fBsymlinkat\fP(2) Added in POSIX.1-2008
-\fBtcdrain\fP(3)
-\fBtcflow\fP(3)
-\fBtcflush\fP(3)
-\fBtcgetattr\fP(3)
-\fBtcgetpgrp\fP(3)
-\fBtcsendbreak\fP(3)
-\fBtcsetattr\fP(3)
-\fBtcsetpgrp\fP(3)
-\fBtime\fP(2)
-\fBtimer_getoverrun\fP(2)
-\fBtimer_gettime\fP(2)
-\fBtimer_settime\fP(2)
-\fBtimes\fP(2)
-\fBumask\fP(2)
-\fBuname\fP(2)
-\fBunlink\fP(2)
-\fBunlinkat\fP(2) Added in POSIX.1-2008
-\fButime\fP(2)
-\fButimensat\fP(2) Added in POSIX.1-2008
-\fButimes\fP(2) Added in POSIX.1-2008
-\fBwait\fP(2)
-\fBwaitpid\fP(2)
-\fBwcpcpy\fP(3) Added in POSIX.1-2008 TC2
-\fBwcpncpy\fP(3) Added in POSIX.1-2008 TC2
-\fBwcscat\fP(3) Added in POSIX.1-2008 TC2
-\fBwcschr\fP(3) Added in POSIX.1-2008 TC2
-\fBwcscmp\fP(3) Added in POSIX.1-2008 TC2
-\fBwcscpy\fP(3) Added in POSIX.1-2008 TC2
-\fBwcscspn\fP(3) Added in POSIX.1-2008 TC2
-\fBwcslen\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsncat\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsncmp\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsncpy\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsnlen\fP(3) Added in POSIX.1-2008 TC2
-\fBwcspbrk\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsrchr\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsspn\fP(3) Added in POSIX.1-2008 TC2
-\fBwcsstr\fP(3) Added in POSIX.1-2008 TC2
-\fBwcstok\fP(3) Added in POSIX.1-2008 TC2
-\fBwmemchr\fP(3) Added in POSIX.1-2008 TC2
-\fBwmemcmp\fP(3) Added in POSIX.1-2008 TC2
-\fBwmemcpy\fP(3) Added in POSIX.1-2008 TC2
-\fBwmemmove\fP(3) Added in POSIX.1-2008 TC2
-\fBwmemset\fP(3) Added in POSIX.1-2008 TC2
-\fBwrite\fP(2)
+\f[B]signal\f[](2)
+\f[B]sigpause\f[](3)
+\f[B]sigpending\f[](2)
+\f[B]sigprocmask\f[](2)
+\f[B]sigqueue\f[](2)
+\f[B]sigset\f[](3)
+\f[B]sigsuspend\f[](2)
+\f[B]sleep\f[](3)
+\f[B]sockatmark\f[](3) Added in POSIX.1-2001 TC2
+\f[B]socket\f[](2)
+\f[B]socketpair\f[](2)
+\f[B]stat\f[](2)
+\f[B]stpcpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]stpncpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strcat\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strchr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strcmp\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strcpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strcspn\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strlen\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strncat\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strncmp\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strncpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strnlen\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strpbrk\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strrchr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strspn\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strstr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]strtok_r\f[](3) Added in POSIX.1-2008 TC2
+\f[B]symlink\f[](2)
+\f[B]symlinkat\f[](2) Added in POSIX.1-2008
+\f[B]tcdrain\f[](3)
+\f[B]tcflow\f[](3)
+\f[B]tcflush\f[](3)
+\f[B]tcgetattr\f[](3)
+\f[B]tcgetpgrp\f[](3)
+\f[B]tcsendbreak\f[](3)
+\f[B]tcsetattr\f[](3)
+\f[B]tcsetpgrp\f[](3)
+\f[B]time\f[](2)
+\f[B]timer_getoverrun\f[](2)
+\f[B]timer_gettime\f[](2)
+\f[B]timer_settime\f[](2)
+\f[B]times\f[](2)
+\f[B]umask\f[](2)
+\f[B]uname\f[](2)
+\f[B]unlink\f[](2)
+\f[B]unlinkat\f[](2) Added in POSIX.1-2008
+\f[B]utime\f[](2)
+\f[B]utimensat\f[](2) Added in POSIX.1-2008
+\f[B]utimes\f[](2) Added in POSIX.1-2008
+\f[B]wait\f[](2)
+\f[B]waitpid\f[](2)
+\f[B]wcpcpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcpncpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcscat\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcschr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcscmp\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcscpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcscspn\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcslen\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsncat\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsncmp\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsncpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsnlen\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcspbrk\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsrchr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsspn\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcsstr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wcstok\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wmemchr\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wmemcmp\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wmemcpy\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wmemmove\f[](3) Added in POSIX.1-2008 TC2
+\f[B]wmemset\f[](3) Added in POSIX.1-2008 TC2
+\f[B]write\f[](2)
.TE
.P
Notes:
____
lB c c l.
Signal Standard Action Comment
-SIGABRT P1990 Core Abort signal from \fBabort\fP(3)
-SIGALRM P1990 Term Timer signal from \fBalarm\fP(2)
+SIGABRT P1990 Core Abort signal from \f[B]abort\f[](3)
+SIGALRM P1990 Term Timer signal from \f[B]alarm\f[](2)
SIGBUS P2001 Core Bus error (bad memory access)
SIGCHLD P2001 Ign Child stopped, terminated, or continued
-SIGCLD \- Ign A synonym for \fBSIGCHLD\fP
+SIGCLD \- Ign A synonym for \f[B]SIGCHLD\f[]
SIGCONT P1990 Cont Continue if stopped
SIGEMT \- Term Emulator trap
SIGFPE P1990 Core Erroneous arithmetic operation
SIGHUP P1990 Term Hangup detected on controlling terminal
or death of controlling process
SIGILL P1990 Core Illegal Instruction
-SIGINFO \- A synonym for \fBSIGPWR\fP
+SIGINFO \- A synonym for \f[B]SIGPWR\f[]
SIGINT P1990 Term Interrupt from keyboard
SIGIO \- Term I/O now possible (4.2BSD)
-SIGIOT \- Core IOT trap. A synonym for \fBSIGABRT\fP
+SIGIOT \- Core IOT trap. A synonym for \f[B]SIGABRT\f[]
SIGKILL P1990 Term Kill signal
SIGLOST \- Term File lock lost (unused)
SIGPIPE P1990 Term Broken pipe: write to pipe with no
- readers; see \fBpipe\fP(7)
+ readers; see \f[B]pipe\f[](7)
SIGPOLL P2001 Term Pollable event (Sys V);
- synonym for \fBSIGIO\fP
+ synonym for \f[B]SIGIO\f[]
SIGPROF P2001 Term Profiling timer expired
SIGPWR \- Term Power failure (System V)
SIGQUIT P1990 Core Quit from keyboard
SIGSTOP P1990 Stop Stop process
SIGTSTP P1990 Stop Stop typed at terminal
SIGSYS P2001 Core Bad system call (SVr4);
- see also \fBseccomp\fP(2)
+ see also \f[B]seccomp\f[](2)
SIGTERM P1990 Term Termination signal
SIGTRAP P2001 Core Trace/breakpoint trap
SIGTTIN P1990 Stop Terminal input for background process
SIGTTOU P1990 Stop Terminal output for background process
-SIGUNUSED \- Core Synonymous with \fBSIGSYS\fP
+SIGUNUSED \- Core Synonymous with \f[B]SIGSYS\f[]
SIGURG P2001 Ign Urgent condition on socket (4.2BSD)
SIGUSR1 P1990 Term User-defined signal 1
SIGUSR2 P1990 Term User-defined signal 2
SIGVTALRM P2001 Term Virtual alarm clock (4.2BSD)
SIGXCPU P2001 Core CPU time limit exceeded (4.2BSD);
- see \fBsetrlimit\fP(2)
+ see \f[B]setrlimit\f[](2)
SIGXFSZ P2001 Core File size limit exceeded (4.2BSD);
- see \fBsetrlimit\fP(2)
+ see \f[B]setrlimit\f[](2)
SIGWINCH \- Ign Window resize signal (4.3BSD, Sun)
.TE
.P
lb lb
l l.
Linux 2.0 and earlier Linux 2.2 and later
-\fBsigaction\fP(2) \fBrt_sigaction\fP(2)
-\fBsigpending\fP(2) \fBrt_sigpending\fP(2)
-\fBsigprocmask\fP(2) \fBrt_sigprocmask\fP(2)
-\fBsigreturn\fP(2) \fBrt_sigreturn\fP(2)
-\fBsigsuspend\fP(2) \fBrt_sigsuspend\fP(2)
-\fBsigtimedwait\fP(2) \fBrt_sigtimedwait\fP(2)
+\f[B]sigaction\f[](2) \f[B]rt_sigaction\f[](2)
+\f[B]sigpending\f[](2) \f[B]rt_sigpending\f[](2)
+\f[B]sigprocmask\f[](2) \f[B]rt_sigprocmask\f[](2)
+\f[B]sigreturn\f[](2) \f[B]rt_sigreturn\f[](2)
+\f[B]sigsuspend\f[](2) \f[B]rt_sigsuspend\f[](2)
+\f[B]sigtimedwait\f[](2) \f[B]rt_sigtimedwait\f[](2)
.TE
.\"
.SS Interruption of system calls and library functions by signal handlers
describing commands and utilities, ratified by ISO in 1993
.RI ( "ISO/IEC 9945-2:1993" ).
.TP
-.BR POSIX.1b " (formerly known as \fIPOSIX.4\fP)"
+.BR POSIX.1b " (formerly known as \f[I]POSIX.4\f[])"
IEEE Std 1003.1b-1993,
describing real-time facilities
for portable operating systems, ratified by ISO in 1996
.RI ( "ISO/IEC 9945-1:1996" ).
.TP
-.BR POSIX.1c " (formerly known as \fIPOSIX.4a\fP)"
+.BR POSIX.1c " (formerly known as \f[I]POSIX.4a\f[])"
IEEE Std 1003.1c-1995, which describes the POSIX threads interfaces.
.TP
.B POSIX.1d
Suffix File type
\&,v files for RCS (Revision Control System)
\&- backup file
-\&.C C++ source code, equivalent to \fI.cc\fP
-\&.F Fortran source with \fBcpp\fP(1) directives
+\&.C C++ source code, equivalent to \f[I].cc\f[]
+\&.F Fortran source with \f[B]cpp\f[](1) directives
\& or file compressed using freeze
-\&.S assembler source with \fBcpp\fP(1) directives
+\&.S assembler source with \f[B]cpp\f[](1) directives
\&.Y file compressed using yabba
-\&.Z file compressed using \fBcompress\fP(1)
+\&.Z file compressed using \f[B]compress\f[](1)
\&.[0\-9]+gf TeX generic font files
\&.[0\-9]+pk TeX packed font files
\&.[1\-9] manual page for the corresponding section
\&.ads Ada spec source
\&.afm PostScript font metrics
\&.al Perl autoload file
-\&.am \fBautomake\fP(1) input file
-\&.arc \fBarc\fP(1) archive
-\&.arj \fBarj\fP(1) archive
+\&.am \f[B]automake\f[](1) input file
+\&.arc \f[B]arc\f[](1) archive
+\&.arj \f[B]arj\f[](1) archive
\&.asc PGP ASCII-armored data
\&.asm (GNU) assembler source file
\&.au Audio sound file
\&.awk AWK language program
\&.b LILO boot loader image
\&.bak backup file
-\&.bash \fBbash\fP(1) shell script
+\&.bash \f[B]bash\f[](1) shell script
\&.bb basic block list data produced by
\& gcc \-ftest\-coverage
\&.bbg basic block graph data produced by
\&.bib TeX bibliographic database, BibTeX input
\&.bm bitmap source
\&.bmp bitmap
-\&.bz2 file compressed using \fBbzip2\fP(1)
+\&.bz2 file compressed using \f[B]bzip2\f[](1)
\&.c C source
\&.cat message catalog files
\&.cc C++ source
\&.class Java compiled byte-code
\&.conf configuration file
\&.config configuration file
-\&.cpp equivalent to \fI.cc\fR
-\&.csh \fBcsh\fP(1) shell script
-\&.cxx equivalent to \fI.cc\fR
+\&.cpp equivalent to \f[I].cc\f[]
+\&.csh \f[B]csh\f[](1) shell script
+\&.cxx equivalent to \f[I].cc\f[]
\&.dat data file
\&.deb Debian software package
\&.def Modula-2 source for definition modules
\&.def other definition files
\&.desc initial part of mail message unpacked with
-\& \fBmunpack\fP(1)
+\& \f[B]munpack\f[](1)
\&.diff T{
file differences (\c
.BR diff (1)
\&.gif Compuserve Graphics Image File format
\&.gmo GNU format message catalog
\&.gsf Ghostscript fonts
-\&.gz file compressed using \fBgzip\fP(1)
+\&.gz file compressed using \f[B]gzip\f[](1)
\&.h C or C++ header files
\&.help help file
-\&.hf equivalent to \fI.help\fP
-\&.hlp equivalent to \fI.help\fP
-\&.htm poor man's \fI.html\fP
+\&.hf equivalent to \f[I].help\f[]
+\&.hlp equivalent to \f[I].help\f[]
+\&.htm poor man's \f[I].html\f[]
\&.html HTML document used with the World Wide Web
\&.hqx 7-bit encoded Macintosh file
\&.i C source after preprocessing
\& itcl ([incr Tcl]) is an OO extension of tcl
\&.java a Java source file
\&.jpeg Joint Photographic Experts Group format
-\&.jpg poor man's \fI.jpeg\fP
+\&.jpg poor man's \f[I].jpeg\f[]
\&.js JavaScript source code
\&.jsx JSX (JavaScript XML-like extension) source code
-\&.kmap \fBlyx\fP(1) keymap
-\&.l equivalent to \fI.lex\fP or \fI.lisp\fP
-\&.lex \fBlex\fP(1) or \fBflex\fP(1) files
+\&.kmap \f[B]lyx\f[](1) keymap
+\&.l equivalent to \f[I].lex\f[] or \f[I].lisp\f[]
+\&.lex \f[B]lex\f[](1) or \f[B]flex\f[](1) files
\&.lha lharc archive
\&.lib Common-Lisp library
\&.lisp Lisp source
-\&.ln files for use with \fBlint\fP(1)
+\&.ln files for use with \f[B]lint\f[](1)
\&.log log file, in particular produced by TeX
\&.lsm Linux Software Map entry
\&.lsp Common-Lisp source
\&.lzh lharc archive
\&.m Objective-C source code
-\&.m4 \fBm4\fP(1) source
+\&.m4 \f[B]m4\f[](1) source
\&.mac macro files for various programs
\&.man manual page (usually source rather than formatted)
\&.map map files for various programs
\&.me Nroff source using the me macro package
\&.mf Metafont (font generator for TeX) source
\&.mgp MagicPoint file
-\&.mm sources for \fBgroff\fP(1) in mm - format
+\&.mm sources for \f[B]groff\f[](1) in mm - format
\&.mo Message catalog binary file
\&.mod Modula-2 source for implementation modules
\&.mov (quicktime) movie
\&.mpeg movie file
\&.o object file
\&.old old or backup file
-\&.orig backup (original) version of a file, from \fBpatch\fP(1)
+\&.orig backup (original) version of a file, from \f[B]patch\f[](1)
\&.out output file, often executable program (a.out)
\&.p Pascal source
\&.pag dbm data base data file
-\&.patch file differences for \fBpatch\fP(1)
+\&.patch file differences for \f[B]patch\f[](1)
\&.pbm portable bitmap format
\&.pcf X11 font files
\&.pdf Adobe Portable Data Format
-\& (use Acrobat/\fBacroread\fP or \fBxpdf\fP)
+\& (use Acrobat/\f[B]acroread\f[] or \f[B]xpdf\f[])
\&.perl Perl source (see .ph, .pl, and .pm)
\&.pfa PostScript font definition files, ASCII format
\&.pfb PostScript font definition files, binary format
\&.pm Perl module
\&.png Portable Network Graphics file
\&.po Message catalog source
-\&.pod \fBperldoc\fP(1) file
+\&.pod \f[B]perldoc\f[](1) file
\&.ppm portable pixmap format
\&.pr bitmap source
\&.ps PostScript file
\&.pyc compiled python
\&.qt quicktime movie
\&.r RATFOR source (obsolete)
-\&.rej patches that \fBpatch\fP(1) couldn't apply
+\&.rej patches that \f[B]patch\f[](1) couldn't apply
\&.rpm RPM software package
\&.rtf Rich Text Format file
\&.rules rules for something
\&.s assembler source
\&.sa stub libraries for a.out shared libraries
-\&.sc \fBsc\fP(1) spreadsheet commands
+\&.sc \f[B]sc\f[](1) spreadsheet commands
\&.scm Scheme source code
\&.sed sed source file
\&.sgml SGML source file
-\&.sh \fBsh\fP(1) scripts
-\&.shar archive created by the \fBshar\fP(1) utility
+\&.sh \f[B]sh\f[](1) scripts
+\&.shar archive created by the \f[B]shar\f[](1) utility
\&.shtml HTML using Server Side Includes
\&.so Shared library or dynamically loadable object
\&.sql SQL source
\&.sqml SQML schema or query program
\&.sty LaTeX style files
\&.sym Modula-2 compiled definition modules
-\&.tar archive created by the \fBtar\fP(1) utility
-\&.tar.Z tar(1) archive compressed with \fBcompress\fP(1)
-\&.tar.bz2 tar(1) archive compressed with \fBbzip2\fP(1)
-\&.tar.gz tar(1) archive compressed with \fBgzip\fP(1)
-\&.taz tar(1) archive compressed with \fBcompress\fP(1)
+\&.tar archive created by the \f[B]tar\f[](1) utility
+\&.tar.Z tar(1) archive compressed with \f[B]compress\f[](1)
+\&.tar.bz2 tar(1) archive compressed with \f[B]bzip2\f[](1)
+\&.tar.gz tar(1) archive compressed with \f[B]gzip\f[](1)
+\&.taz tar(1) archive compressed with \f[B]compress\f[](1)
\&.tcl tcl source code
\&.tex TeX or LaTeX source
-\&.texi equivalent to \fI.texinfo\fP
+\&.texi equivalent to \f[I].texinfo\f[]
\&.texinfo Texinfo documentation source
\&.text text file
\&.tfm TeX font metric file
-\&.tgz tar archive compressed with \fBgzip\fP(1)
-\&.tif poor man's \fI.tiff\fP
+\&.tgz tar archive compressed with \f[B]gzip\f[](1)
+\&.tif poor man's \f[I].tiff\f[]
\&.tiff Tagged Image File Format
\&.tk tcl/tk script
\&.tmp temporary file
\&.tmpl template files
\&.ts TypeScript source code
-\&.tsx TypeScript with JSX source code (\fI.ts\fP + \fI.jsx\fP)
-\&.txt equivalent to \fI.text\fP
-\&.uu equivalent to \fI.uue\fP
-\&.uue binary file encoded with \fBuuencode\fP(1)
+\&.tsx TypeScript with JSX source code (\f[I].ts\f[] + \f[I].jsx\f[])
+\&.txt equivalent to \f[I].text\f[]
+\&.uu equivalent to \f[I].uue\f[]
+\&.uue binary file encoded with \f[B]uuencode\f[](1)
\&.vf TeX virtual font file
\&.vpl TeX virtual property list file
\&.w Silvio Levi's CWEB
\&.xpm X11 pixmap source
\&.xs Perl xsub file produced by h2xs
\&.xsl XSL stylesheet
-\&.y \fByacc\fP(1) or \fBbison\fP(1) (parser generator) files
+\&.y \f[B]yacc\f[](1) or \f[B]bison\f[](1) (parser generator) files
\&.z T{
File compressed using
.BR pack (1)
(or an old
.BR gzip (1))
T}
-\&.zip \fBzip\fP(1) archive
-\&.zoo \fBzoo\fP(1) archive
-\&\[ti] Emacs or \fBpatch\fP(1) backup file
-\&rc startup (`run control') file, e.g., \fI.newsrc\fP
+\&.zip \f[B]zip\f[](1) archive
+\&.zoo \f[B]zoo\f[](1) archive
+\&\[ti] Emacs or \f[B]patch\f[](1) backup file
+\&rc startup (`run control') file, e.g., \f[I].newsrc\f[]
.TE
.SH STANDARDS
General UNIX conventions.
symbolic links encountered during the file tree traversal and symbolic
links listed as command-line arguments.
.P
-The \fIfirst rule\fP applies to symbolic links that reference files other
-than directories.
+The
+.I first rule
+applies to symbolic links that reference files other than directories.
Operations that apply to symbolic links are performed on the links
themselves, but otherwise the links are ignored.
.P
affect the file referred to by
.IR slink .
.P
-The \fIsecond rule\fP applies to symbolic links that refer to directories.
+The
+.I second rule
+applies to symbolic links that refer to directories.
Symbolic links that refer to directories are never followed by default.
This is often referred to as a "physical" walk, as opposed to a "logical"
walk (where symbolic links that refer to directories are followed).
This variable defines how many
bytes of the TCP window are reserved for buffering overhead.
.IP
-A maximum of (\fIwindow/2\[ha]tcp_app_win\fP, mss) bytes in the window
+A maximum of
+.RI ( window/2\[ha]tcp_app_win ,
+mss) bytes in the window
are reserved for the application buffer.
A value of 0 implies that no amount is reserved.
.\"
.IP
.in +4n
.EX
-max(87380, min(4\ MB, \fItcp_mem\fP[1]*PAGE_SIZE/128))
+.RI "max(87380, min(4\ MB, " tcp_mem [1]*PAGE_SIZE/128))
.EE
.in
.IP
.IP
.in +4n
.EX
-max(65536, min(4\ MB, \fItcp_mem\fP[1]*PAGE_SIZE/128))
+.RI "max(65536, min(4\ MB, " tcp_mem [1]*PAGE_SIZE/128))
.EE
.in
.IP
.TP
.BR TCP_INFO " (since Linux 2.4)"
Used to collect information about this socket.
-The kernel returns a \fIstruct tcp_info\fP as defined in the file
+The kernel returns a
+.I struct tcp_info
+as defined in the file
.IR /usr/include/linux/tcp.h .
This option should not be used in code intended to be portable.
.TP
.P
From the
.BR keyctl (1)
-utility, '\fB@t\fP' can be used instead of a numeric key ID in
+utility,
+.RB ' @t '
+can be used instead of a numeric key ID in
much the same way, but as
.BR keyctl (1)
is a program run after forking, this is of no utility.
.BR setns (2)
in order to move into the namespace.)
.\"
-.SS \fI/proc/\fPpid\fI/timens_offsets\fP
+.SS \f[I]/proc/\f[]pid\f[I]/timens_offsets\f[]
Associated with each time namespace are offsets,
expressed with respect to the initial time namespace,
that define the values of the monotonic and
.P
.in +4n
.EX
-$ \fBcat /proc/self/timens_offsets\fP
+.RB $ " cat /proc/self/timens_offsets"
monotonic 0 0
boottime 0 0
.EE
.P
.in +4n
.EX
-$ \fBreadlink /proc/$$/ns/time\fP
+.RB $ " readlink /proc/$$/ns/time"
time:[4026531834]
.EE
.in
.P
.in +4n
.EX
-$ \fBuptime \-\-pretty\fP
+.RB $ " uptime \-\-pretty"
up 21 hours, 17 minutes
-$ \fB./clock_times\fP
+.RB $ " ./clock_times"
CLOCK_REALTIME : 1585989401.971 (18356 days + 8h 36m 41s)
CLOCK_TAI : 1585989438.972 (18356 days + 8h 37m 18s)
CLOCK_MONOTONIC: 56338.247 (15h 38m 58s)
.P
.in +4n
.EX
-$ \fBPS1="ns2# " sudo unshare \-T \-\- bash \-\-norc\fP
-ns2# \fBecho "monotonic $((2*24*60*60)) 0" > /proc/$$/timens_offsets\fP
-ns2# \fBecho "boottime $((7*24*60*60)) 0" > /proc/$$/timens_offsets\fP
+.RB $ " PS1="ns2# " sudo unshare \-T \-\- bash \-\-norc"
+.RB ns2# " echo "monotonic $((2*24*60*60)) 0" > /proc/$$/timens_offsets"
+.RB ns2# " echo "boottime $((7*24*60*60)) 0" > /proc/$$/timens_offsets"
.EE
.in
.P
.P
.in +4n
.EX
-ns2# \fBcat /proc/$$/timens_offsets\fP
+.RB ns2# " cat /proc/$$/timens_offsets"
monotonic 172800 0
boottime 604800 0
-ns2# \fBecho "boottime $((9*24*60*60)) 0" > /proc/$$/timens_offsets\fP
+.RB ns2# " echo \[dq]boottime $((9*24*60*60)) 0\[dq] > /proc/$$/timens_offsets"
bash: echo: write error: Permission denied
.EE
.in
.P
.in +4n
.EX
-ns2# \fBuptime \-\-pretty\fP
+.RB ns2# " uptime \-\-pretty"
up 1 week, 21 hours, 18 minutes
-ns2# \fB./clock_times\fP
+.RB ns2# " ./clock_times"
CLOCK_REALTIME : 1585989457.056 (18356 days + 8h 37m 37s)
CLOCK_TAI : 1585989494.057 (18356 days + 8h 38m 14s)
CLOCK_MONOTONIC: 229193.332 (2 days + 15h 39m 53s)
.P
.in +4n
.EX
-ns2# \fBreadlink /proc/$$/ns/time\fP
+.RB ns2# " readlink /proc/$$/ns/time"
time:[4026531834]
-ns2# \fBreadlink /proc/$$/ns/time_for_children\fP
+.RB ns2# " readlink /proc/$$/ns/time_for_children"
time:[4026532900]
-ns2# \fBreadlink /proc/self/ns/time\fP # Creates a child process
+.RB ns2# " readlink /proc/self/ns/time" " # Creates a child process"
time:[4026532900]
.EE
.in
.P
.in +4n
.EX
-$ \fBuptime \-\-pretty\fP
+.RB $ " uptime \-\-pretty"
up 21 hours, 19 minutes
-$ \fB./clock_times\fP
+.RB $ " ./clock_times"
CLOCK_REALTIME : 1585989401.971 (18356 days + 8h 38m 51s)
CLOCK_TAI : 1585989438.972 (18356 days + 8h 39m 28s)
CLOCK_MONOTONIC: 56338.247 (15h 41m 8s)
.SS Example output
.in +4n
.EX
-$ \fB./server &\fP
+.RB $ " ./server &"
[1] 25887
-$ \fB./client 3 4\fP
+.RB $ " ./client 3 4" ;
Result = 7
-$ \fB./client 11 \-5\fP
+.RB $ " ./client 11 \-5" ;
Result = 6
-$ \fB./client DOWN\fP
+.RB $ " ./client DOWN" ;
Result = 0
[1]+ Done ./server
$
.SH NAME
uri, url, urn \- uniform resource identifier (URI), including a URL or URN
.SH SYNOPSIS
-.SY "\fIURI\fP \fR=\fP"
+.SY \f[I]URI\f[]\~\f[R]=\f[]
.RI [\~ absoluteURI
|
.IR relativeURI \~]
.IR fragment \~]
.YS
.P
-.SY "\fIabsoluteURI\fP \fR=\fP"
+.SY \f[I]absoluteURI\f[]\~\f[R]=\f[]
.I scheme\~\c
.RB \[dq] : \[dq]
.RI (\~ hierarchical_part
.IR opaque_part \~)
.YS
.P
-.SY "\fIrelativeURI\fP \fR=\fP"
+.SY \f[I]relativeURI\f[]\~\f[R]=\f[]
.RI (\~ net_path
|
.I absolute_path
.IR query \~]
.YS
.P
-.SY "\fIscheme\fP \fR=\fP"
+.SY \f[I]scheme\f[]\~\f[R]=\f[]
.RB \[dq] http \[dq]
|
.RB \[dq] ftp \[dq]
| \&...
.YS
.P
-.SY "\fIhierarchical_part\fP \fR=\fP"
+.SY \f[I]hierarchical_part\f[]\~\f[R]=\f[]
.RI (\~ net_path
|
.IR absolute_path \~)
.IR query \~]
.YS
.P
-.SY "\fInet_path\fP \fR=\fP"
+.SY \f[I]net_path\f[]\~\f[R]=\f[]
.RB \[dq] // \[dq]\~\c
.I authority
.RI [\~ absolute_path \~]
.YS
.P
-.SY "\fIabsolute_path\fP \fR=\fP"
+.SY \f[I]absolute_path\f[]\~\f[R]=\f[]
.RB \[dq] / \[dq]\~\c
.I path_segments
.YS
.P
-.SY "\fIrelative_path\fP \fR=\fP"
+.SY \f[I]relative_path\f[]\~\f[R]=\f[]
.I relative_segment
.RI [\~ absolute_path \~]
.YS
.P
For information on how to embed URIs (including URLs) in a data format,
see documentation on that format.
-HTML uses the format <A HREF="\fIuri\fP">
+HTML uses the format
+.RI "<A\ HREF=\[dq]" uri \[dq]>
.I text
</A>.
-Texinfo files use the format @uref{\fIuri\fP}.
+Texinfo files use the format
+.RI @uref{ uri }.
Man and mdoc have the recently added UR macro, or just include the
URI in the text (viewers should be able to detect :// as part of a URI).
.P
.P
From the
.BR keyctl (1)
-utility, '\fB@u\fP' can be used instead of a numeric key ID in
+utility,
+.RB ' @u '
+can be used instead of a numeric key ID in
much the same way.
.P
User keyrings are independent of
.P
From the
.BR keyctl (1)
-utility, '\fB@us\fP' can be used instead of a numeric key ID in
-much the same way.
+utility,
+.RB ' @us '
+can be used instead of a numeric key ID in much the same way.
.P
User session keyrings are independent of
.BR clone (2),
.P
.in +4n
.EX
-$ \fBcat /proc/$$/uid_map\fP
+.RB $ " cat /proc/$$/uid_map" ;
0 0 4294967295
.EE
.in
.\"
.\" ============================================================
.\"
-.SS The \fI/proc/\fPpid\fI/setgroups\fP file
+.SS The \f[I]/proc/\f[]pid\f[I]/setgroups\f[] file
.\"
.\" commit 9cc46516ddf497ea16e8d7cb986ae03a0f6b92f8
.\" commit 66d2f338ee4c449396b6f99f5e75cd18eb6df272
.P
.in +4n
.EX
-$ \fBuname \-rs\fP # Need Linux 3.8 or later
+.RB $ " uname \-rs" "; # Need Linux 3.8 or later"
Linux 3.8.0
-$ \fBid \-u\fP # Running as unprivileged user
+.RB $ " id \-u" "; # Running as unprivileged user"
1000
-$ \fBid \-g\fP
+.RB $ " id \-g" ;
1000
.EE
.in
.P
.in +4n
.EX
-$ \fB./userns_child_exec \-p \-m \-U \-M \[aq]0 1000 1\[aq] \-G \[aq]0 1000 1\[aq] bash\fP
+.RB $ " ./userns_child_exec \-p \-m \-U \-M \[aq]0 1000 1\[aq] \-G \[aq]0 1000 1\[aq] bash" ;
.EE
.in
.P
.P
.in +4n
.EX
-bash$ \fBecho $$\fP
+.RB bash$ " echo $$" ;
1
.EE
.in
.P
.in +4n
.EX
-bash$ \fBmount \-t proc proc /proc\fP
-bash$ \fBps ax\fP
+.RB bash$ " mount \-t proc proc /proc" ;
+.RB bash$ " ps ax" ;
PID TTY STAT TIME COMMAND
1 pts/3 S 0:00 bash
22 pts/3 R+ 0:00 ps ax
.P
.in +4n
.EX
-bash$ \fBcat /proc/$$/status | egrep \[aq]\[ha][UG]id\[aq]\fP
+.RB bash$ " cat /proc/$$/status | egrep \[aq]\[ha][UG]id\[aq]" ;
Uid: 0 0 0 0
Gid: 0 0 0 0
-bash$ \fBcat /proc/$$/status | egrep \[aq]\[ha]Cap(Prm|Inh|Eff)\[aq]\fP
+.RB bash$ " cat /proc/$$/status | egrep \[aq]\[ha]Cap(Prm|Inh|Eff)\[aq]" ;
CapInh: 0000000000000000
CapPrm: 0000001fffffffff
CapEff: 0000001fffffffff
__kernel_datapage_offset LINUX_2.6.15
__kernel_get_syscall_map LINUX_2.6.15
__kernel_get_tbfreq LINUX_2.6.15
-__kernel_getcpu \fI*\fR LINUX_2.6.15
+__kernel_getcpu \f[I]*\f[] LINUX_2.6.15
__kernel_gettimeofday LINUX_2.6.15
__kernel_sigtramp_rt32 LINUX_2.6.15
__kernel_sigtramp32 LINUX_2.6.15
handles a.out binaries, a binary format used long ago.
The program
.B ld\-linux.so*
-(\fI/lib/ld\-linux.so.1\fP for libc5, \fI/lib/ld\-linux.so.2\fP for glibc2)
+.RI ( /lib/ld\-linux.so.1
+for libc5,
+.I /lib/ld\-linux.so.2
+for glibc2)
handles binaries that are in the more modern ELF format.
Both programs have the same behavior, and use the same
support files and programs
to prevent their expansion as shell or environment variables.
.SH OPTIONS
.TP
-.BR \-\-argv0 " \fIstring\fP (since glibc 2.33)"
+.BR \-\-argv0 " \f[I]string\f[] (since glibc 2.33)"
Set
.I argv[0]
to the value
Print the names and values of all tunables,
along with the minimum and maximum allowed values.
.TP
-.BR \-\-preload " \fIlist\fP (since glibc 2.30)"
+.BR \-\-preload " \f[I]list\f[] (since glibc 2.30)"
Preload the objects specified in
.IR list .
The objects in
.IP
.in +4n
.EX
-$ \fBLD_ASSUME_KERNEL=2.2.5 ./myprog\fP
+.RB $ " LD_ASSUME_KERNEL=2.2.5 ./myprog"
.EE
.in
.IP
.IP
.in +4n
.EX
-$ \fBLD_LIBRARY_PATH=\[aq]$ORIGIN/$LIB\[aq] prog\fP
+.RB $ " LD_LIBRARY_PATH=\[aq]$ORIGIN/$LIB\[aq] prog"
.EE
.in
.IP
.P
.in +4n
.EX
-$ \fBnscd \-i\fP \fI<database>\fP
+.RB $ " nscd \-i \f[I]<database>\f[]"
.EE
.in
.SH SEE ALSO