Compare commits

..

No commits in common. "c2d505de654b6b4567225fd9bfc57e51be4a971c" and "bd62f2240be5a2e29bb5fe2512cc863bcfe2766d" have entirely different histories.

28 changed files with 60 additions and 337 deletions

View File

@ -23,11 +23,14 @@ ldd \- print shared object dependencies
prints the shared objects (shared libraries) required by each program or
shared object specified on the command line.
An example of its use and output
(using
.BR sed (1)
to trim leading white space for readability in this page)
is the following:
.PP
.in +4n
.EX
$ \fBldd /bin/ls\fP
$ \fBldd /bin/ls | sed \(aqs/^ */ /\(aq\fP
linux\-vdso.so.1 (0x00007ffcc3563000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f87e5254000)

View File

@ -245,8 +245,7 @@ and
.IR intcurrsym .
.TP
.B \-\-posix
Conform strictly to POSIX.
Implies
Conform strictly to POSIX. Implies
.BR \-\-verbose .
This option currently has no other effect.
POSIX conformance is assumed if the environment variable

View File

@ -358,8 +358,8 @@ call will still fail.
These calls
may not work correctly on NFSv2 filesystems with UID mapping enabled,
because UID mapping is done on the server and hidden from the client,
which checks permissions.
(NFS versions 3 and higher perform the check on the server.)
which checks permissions. (NFS versions 3 and higher perform the check on
the server.)
Similar problems can occur to FUSE mounts.
.\"
.\"

View File

@ -33,6 +33,9 @@ close_range \- close all file descriptors in a given range
.BI "int close_range(unsigned int " first ", unsigned int " last ,
.BI " unsigned int " flags );
.fi
.PP
.IR Note :
There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
The
.BR close_range ()
@ -97,6 +100,8 @@ Library support was added in glibc in version 2.34.
.BR close_range ()
is a nonstandard function that is also present on FreeBSD.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
.SS Closing all open file descriptors
.\" 278a5fbaed89dacd04e9d052f4594ffd0e0585de
To avoid blindly closing file descriptors

View File

@ -685,8 +685,7 @@ These are legal only for the superuser or the owner of the current terminal.
.TP
.B "TIOCLINUX, subcode=0"
Dump the screen.
Disappeared in Linux 1.1.92.
(With kernel 1.1.92 or later, read from
Disappeared in Linux 1.1.92. (With kernel 1.1.92 or later, read from
.I /dev/vcsN
or
.I /dev/vcsaN

View File

@ -43,8 +43,7 @@ The
operation requires privilege
.RB ( CAP_SYS_ADMIN ).
.SH RETURN VALUE
On success zero is returned.
On error, \-1 is returned, and
On success zero is returned. On error, \-1 is returned, and
.I errno
is set to indicate the error.
.SH ERRORS
@ -78,8 +77,7 @@ The maximum string length for this interface is
.BR FSLABEL_MAX ,
including the terminating null byte (\(aq\\0\(aq).
Filesystems have differing maximum label lengths, which may or
may not include the terminating null.
The string provided to
may not include the terminating null. The string provided to
.B FS_IOC_SETFSLABEL
must always be null-terminated, and the string returned by
.B FS_IOC_GETFSLABEL

View File

@ -71,67 +71,6 @@ Equivalent to
Allow the output buffer to drain, discard pending input, and
set the current serial port settings.
.PP
The following four ioctls, added in Linux 2.6.20,
.\" commit 64bb6c5e1ddcd47c951740485026ef08975ee2e6
.\" commit 592ee3a5e5e2a981ef2829a0380093006d045661
are just like
.BR TCGETS ,
.BR TCSETS ,
.BR TCSETSW ,
.BR TCSETSF ,
except that they take a
.I "struct termios2\ *"
instead of a
.IR "struct termios\ *" .
If the structure member
.B c_cflag
contains the flag
.BR BOTHER ,
then the baud rate is stored in the structure members
.B c_ispeed
and
.B c_ospeed
as integer values.
These ioctls are not supported on all architectures.
.RS
.TS
lb l.
TCGETS2 \fBstruct termios2 *\fPargp
TCSETS2 \fBconst struct termios2 *\fPargp
TCSETSW2 \fBconst struct termios2 *\fPargp
TCSETSF2 \fBconst struct termios2 *\fPargp
.TE
.RE
.PP
The following four ioctls are just like
.BR TCGETS ,
.BR TCSETS ,
.BR TCSETSW ,
.BR TCSETSF ,
except that they take a
.I "struct termios2\ *"
instead of a
.IR "struct termios\ *" .
If the structure member
.B c_cflag
contains the flag
.B BOTHER
then, the baud rate is stored in the structure members
.B c_ispeed
and
.B c_ospeed
as integer values.
These ioctls are not supported on all architectures.
.RS
.TS
lb l.
TCGETS2 \fBstruct termios2 *\fPargp
TCSETS2 \fBconst struct termios2 *\fPargp
TCSETSW2 \fBconst struct termios2 *\fPargp
TCSETSF2 \fBconst struct termios2 *\fPargp
.TE
.RE
.PP
The following four ioctls are just like
.BR TCGETS ,
.BR TCSETS ,
@ -762,8 +701,7 @@ Insufficient permission.
Check the condition of DTR on the serial port.
.PP
.EX
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/ioctl.h>

View File

@ -439,8 +439,7 @@ call.
.B EAGAIN
.BR RESOLVE_CACHED
was set, and the open operation cannot be performed using only cached
information.
The caller should retry without
information. The caller should retry without
.B RESOLVE_CACHED
set in
.I how.resolve .

View File

@ -141,7 +141,9 @@ are atomic: the data written by
.\" Regarding atomicity, see https://bugzilla.kernel.org/show_bug.cgi?id=10596
.BR writev ()
is written as a single block that is not intermingled with output
from writes in other processes;
from writes in other processes (but see
.BR pipe (7)
for an exception);
analogously,
.BR readv ()
is guaranteed to read a contiguous block of data from the file,

View File

@ -261,44 +261,6 @@ This flag is meaningful only when establishing a signal handler.
.\" .I sa_sigaction
.\" field was added in Linux 2.1.86.)
.\"
.TP
.B SA_UNSUPPORTED
Used to dynamically probe for flag bit support.
.IP
If an attempt to register a handler succeeds with this flag set in
.I act\->sa_flags
alongside other flags that are potentially unsupported by the kernel,
and an immediately subsequent
.BR sigaction ()
call specifying the same signal number and with a non-NULL
.I oldact
argument yields
.B SA_UNSUPPORTED
.I clear
in
.IR oldact->sa_flags ,
then
.I oldact->sa_flags
may be used as a bitmask
describing which of the potentially unsupported flags are,
in fact, supported.
See the section "Dynamically probing for flag bit support"
below for more details.
.TP
.BR SA_EXPOSE_TAGBITS " (since Linux 5.11)"
Normally, when delivering a signal,
an architecture-specific set of tag bits are cleared from the
.I si_addr
field of
.IR siginfo_t .
If this flag is set,
an architecture-specific subset of the tag bits will be preserved in
.IR si_addr .
.IP
Programs that need to be compatible with Linux versions older than 5.11
must use
.B SA_UNSUPPORTED
to probe for support.
.SS The siginfo_t argument to a SA_SIGINFO handler
When the
.B SA_SIGINFO
@ -884,61 +846,6 @@ Triggered by a
.BR seccomp (2)
filter rule.
.RE
.SS Dynamically probing for flag bit support
The
.BR sigaction ()
call on Linux accepts unknown bits set in
.I act\->sa_flags
without error.
The behavior of the kernel starting with Linux 5.11 is that a second
.BR sigaction ()
will clear unknown bits from
.IR oldact\->sa_flags .
However, historically, a second
.BR sigaction ()
call would typically leave those bits set in
.IR oldact\->sa_flags .
.PP
This means that support for new flags cannot be detected
simply by testing for a flag in
.IR sa_flags ,
and a program must test that
.B SA_UNSUPPORTED
has been cleared before relying on the contents of
.IR sa_flags .
.PP
Since the behavior of the signal handler cannot be guaranteed
unless the check passes,
it is wise to either block the affected signal
while registering the handler and performing the check in this case,
or where this is not possible,
for example if the signal is synchronous, to issue the second
.BR sigaction ()
in the signal handler itself.
.PP
In kernels that do not support a specific flag,
the kernel's behavior is as if the flag was not set,
even if the flag was set in
.IR act\->sa_flags .
.PP
The flags
.BR SA_NOCLDSTOP ,
.BR SA_NOCLDWAIT ,
.BR SA_SIGINFO ,
.BR SA_ONSTACK ,
.BR SA_RESTART ,
.BR SA_NODEFER ,
.BR SA_RESETHAND ,
and, if defined by the architecture,
.B SA_RESTORER
may not be reliably probed for using this mechanism,
because they were introduced before Linux 5.11.
However, in general, programs may assume that these flags are supported,
since they have all been supported since Linux 2.6,
which was released in the year 2003.
.PP
See EXAMPLES below for a demonstration of the use of
.BR SA_UNSUPPORTED .
.SH RETURN VALUE
.BR sigaction ()
returns 0 on success; on error, \-1 is returned, and
@ -1144,49 +1051,6 @@ This bug was fixed in kernel 2.6.14.
.SH EXAMPLES
See
.BR mprotect (2).
.SS Probing for flag support
The following example program exits with status
.B EXIT_SUCCESS
if
.B SA_EXPOSE_TAGBITS
is determined to be supported, and
.B EXIT_FAILURE
otherwise.
.PP
.EX
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
void
handler(int signo, siginfo_t *info, void *context)
{
struct sigaction oldact;
if (sigaction(SIGSEGV, NULL, &oldact) == \-1 ||
(oldact.sa_flags & SA_UNSUPPORTED) ||
!(oldact.sa_flags & SA_EXPOSE_TAGBITS)) {
_exit(EXIT_FAILURE);
}
_exit(EXIT_SUCCESS);
}
int
main(void)
{
struct sigaction act = { 0 };
act.sa_flags = SA_SIGINFO | SA_UNSUPPORTED | SA_EXPOSE_TAGBITS;
act.sa_sigaction = &handler;
if (sigaction(SIGSEGV, &act, NULL) == \-1) {
perror("sigaction");
exit(EXIT_FAILURE);
}
raise(SIGSEGV);
}
.EE
.SH SEE ALSO
.BR kill (1),
.BR kill (2),

View File

@ -412,10 +412,6 @@ T}
.\" 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
\fBlandlock_add_rule\fP(2) 5.13
\fBlchown\fP(2) 1.0 T{
See \fBchown\fP(2) for
version details
@ -566,7 +562,6 @@ T}
\fBpwritev2\fP(2) 4.6
\fBquery_module\fP(2) 2.2 Removed in 2.6
\fBquotactl\fP(2) 1.0
\fBquotactl_path\fP(2) 5.13
\fBread\fP(2) 1.0
\fBreadahead\fP(2) 2.4.13
\fBreaddir\fP(2) 1.0

View File

@ -293,8 +293,7 @@ returning the number of bytes actually transferred.
An error return value while performing
.BR write ()
using direct I/O does not mean the
entire write has failed.
Partial data may be written
entire write has failed. Partial data may be written
and the data at the file offset on which the
.BR write ()
was attempted should be considered inconsistent.

View File

@ -153,15 +153,12 @@ There are several scenarios when the address of a global symbol is NULL.
For example, a symbol can be placed at zero address by the linker, via
a linker script or with
.I \-\-defsym
command-line option.
Undefined weak symbols also have NULL value.
command-line option. Undefined weak symbols also have NULL value.
Finally, the symbol value may be the result of
a GNU indirect function (IFUNC) resolver function that returns
NULL as the resolved value.
In the latter case,
NULL as the resolved value. In the latter case,
.BR dlsym ()
also returns NULL without error.
However, in the former two cases, the
also returns NULL without error. However, in the former two cases, the
behavior of GNU dynamic linker is inconsistent: relocation processing
succeeds and the symbol can be observed to have NULL value, but
.BR dlsym ()

View File

@ -130,7 +130,7 @@ A legitimate option character is any visible one byte
.BR ascii (7)
character (for which
.BR isgraph (3)
would return nonzero) that is not \(aq\-\(aq, \(aq:\(aq, or \(aq;\(aq.
would return nonzero) that is not \(aq\-\(aq or \(aq:\(aq.
If such a
character is followed by a colon, the option requires an argument, so
.BR getopt ()
@ -166,18 +166,9 @@ If the first character of
.B POSIXLY_CORRECT
is set, then option processing stops as soon as a nonoption argument is
encountered.
If \(aq+\(aq is not the first character of
.IR optstring ,
it is treated as a normal option.
If
.B POSIXLY_CORRECT
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
an option with character code 1.
(This is used by programs that were
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
and that care about the ordering of the two.)
The special argument "\-\-" forces an end of option-scanning regardless

View File

@ -111,7 +111,7 @@ conversion specification.)
.BR T_FMT_AMPM \ (LC_TIME)
Return a string that can be used as a format string for
.BR strftime (3)
to represent a time in a.m. or p.m. notation in a locale-specific way
to represent a time in a.m. or p.m. notation a locale-specific way
.RB ( %r
conversion specification).
.TP
@ -200,8 +200,7 @@ for alternative representation of a time in a locale-specific way
conversion specification).
.TP
.BR DAY_ "{1\(en7} (LC_TIME)"
Return name of the \fIn\fP-th day of the week.
[Warning: this follows
Return name of the \fIn\fP-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.]
(Used in

View File

@ -66,8 +66,8 @@ All regular expression searching must be done via a compiled pattern
buffer, thus
.BR regexec ()
must always be supplied with the address of a
.BR regcomp ()-initialized
pattern buffer.
.BR regcomp ()
initialized pattern buffer.
.PP
.I cflags
is the

View File

@ -331,8 +331,7 @@ Ignore modem control lines.
.TP
.B LOBLK
(not in POSIX) Block output from a noncurrent shell layer.
For use by \fBshl\fP (shell layers).
(Not implemented on Linux.)
For use by \fBshl\fP (shell layers). (Not implemented on Linux.)
.TP
.B CIBAUD
(not in POSIX) Mask for input speeds.
@ -946,76 +945,24 @@ to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
B57600
B115200
B230400
B460800
B500000
B576000
B921600
B1000000
B1152000
B1500000
B2000000
.ft P
.fi
.PP
These constants are additionally supported on the SPARC architecture:
.PP
.nf
.ft B
B76800
B153600
B307200
B614400
.ft P
.fi
.PP
These constants are additionally supported on non-SPARC architectures:
.PP
.nf
.ft B
B2500000
B3000000
B3500000
B4000000
.ft P
.fi
.PP
Due to differences between architectures, portable applications should check
if a particular
.BI B nnn
constant is defined prior to using it.
.PP
The zero baud rate,
.BR B0 ,
The zero baud rate, \fBB0\fP,
is used to terminate the connection.
If B0 is specified, the modem control lines shall no longer be asserted.
Normally, this will disconnect the line.
.B CBAUDEX
is a mask
\fBCBAUDEX\fP is a mask
for the speeds beyond those defined in POSIX.1 (57600 and above).
Thus,
.BR B57600 " & " CBAUDEX
is nonzero.
.PP
Setting the baud rate to a value other than those defined by
.BI B nnn
constants is possible via the
.B TCSETS2
ioctl; see
.BR ioctl_tty (2).
Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
.PP
.BR cfgetispeed ()
returns the input baud rate stored in the
.I termios
structure.
returns the input baud rate stored in the \fItermios\fP structure.
.PP
.BR cfsetispeed ()
sets the input baud rate stored in the
.I termios
structure to
sets the input baud rate stored in the \fItermios\fP structure to
.IR speed ,
which must be specified as one of the
.BI B nnn
constants listed above for
which must be specified as one of the \fBBnnn\fP constants listed above for
.BR cfsetospeed ().
If the input baud rate is set to zero, the input baud rate will be
equal to the output baud rate.
@ -1109,14 +1056,8 @@ and
are nonstandard, but available on the BSDs.
.SH NOTES
UNIX\ V7 and several later systems have a list of baud rates
where after the values
.BR B0
through
.B B9600
one finds the two constants
.BR EXTA ,
.B EXTB
("External A" and "External B").
where after the fourteen values B0, ..., B9600 one finds the
two constants EXTA, EXTB ("External A" and "External B").
Many systems extend the list with much higher baud rates.
.PP
The effect of a nonzero \fIduration\fP with

View File

@ -24,8 +24,8 @@ xencrypt, xdecrypt, passwd2des \- RFS password encryption
.fi
.SH DESCRIPTION
.BR WARNING :
Do not use these functions in new code.
They do not achieve any type of acceptable cryptographic security guarantees.
Do not use these functions in new code. They do not achieve
any type of acceptable cryptographic security guarantees.
.PP
The function
.BR passwd2des ()

View File

@ -38,8 +38,7 @@ You can explicitly deny access to a host by preceding the
.I hostname
by a minus (\-) sign.
Users from that host must always supply additional credentials,
including possibly a password.
For security reasons you should always
including possibly a password. For security reasons you should always
use the FQDN of the hostname and not the short hostname.
.PP
The

View File

@ -102,10 +102,9 @@ Shadow user passwords, used by
.BR getspnam (3)
and related functions.
.PP
The GNU C Library ignores databases with unknown names.
Some applications use this to implement special handling for their own
databases.
For example,
The GNU C Library ignores databases with unknown names. Some
applications use this to implement special handling for their own
databases. For example,
.BR sudo (8)
consults the
.B sudoers

View File

@ -92,8 +92,8 @@ was eventually made official with the release of Linux 4.5.
Differences between the two versions are described in the text below.
The file
.IR cgroup.sane_behavior ,
present in cgroups v1, is a relic of this mount option.
The file always reports "0" and is only retained for backward compatibility.
present in cgroups v1, is a relic of this mount option. The file
always reports "0" and is only retained for backward compatibility.
.PP
Although cgroups v2 is intended as a replacement for cgroups v1,
the older system continues to exist

View File

@ -525,8 +525,7 @@ If there is a single such prototype that needs to be continued,
then align the continuation line so that when the page is
rendered on a fixed-width font device (e.g., on an xterm) the
continuation line starts just below the start of the argument
list in the line above.
(Exception: the indentation may be
list in the line above. (Exception: the indentation may be
adjusted if necessary to prevent a very long continuation line
or a further continuation line where the function prototype is
very long.)
@ -542,8 +541,7 @@ As an example:
But, where multiple functions in the SYNOPSIS require
continuation lines, and the function names have different
lengths, then align all continuation lines to start in the
same column.
This provides a nicer rendering in PDF output
same column. This provides a nicer rendering in PDF output
(because the SYNOPSIS uses a variable width font where
spaces render narrower than most characters).
As an example:
@ -640,7 +638,7 @@ makes it easier to write tools that parse man page source files.)
.SS Use semantic newlines
In the source of a manual page,
new sentences should be started on new lines,
and long sentences should be split into lines at clause breaks
and long sentences should split into lines at clause breaks
(commas, semicolons, colons, and so on).
This convention, sometimes known as "semantic newlines",
makes it easier to see the effect of patches,

View File

@ -71,8 +71,7 @@ Time CLONE_NEWTIME \fBtime_namespaces\fP(7) T{
Boot and monotonic
clocks
T}
User CLONE_NEWUSER \fBuser_namespaces\fP(7) T{
User and group IDs
User CLONE_NEWUSER \fBuser_namespaces\fP(7) T{User and group IDs
T}
UTS CLONE_NEWUTS \fButs_namespaces\fP(7) T{
Hostname and NIS

View File

@ -189,8 +189,7 @@ message signals an error and the payload contains an
.I nlmsgerr
structure,
.B NLMSG_DONE
message terminates a multipart message.
Error messages get the
message terminates a multipart message. Error messages get the
original request appened, unless the user requests to cap the
error message, and get extra error data if requested.
.PP

View File

@ -177,11 +177,10 @@ with the
flag set (though note that this also restricts bind mount traversal).
.SS Trailing slashes
If a pathname ends in a \(aq/\(aq, that forces resolution of the preceding
component as in Step 2:
the component preceding the slash either exists and resolves to a directory
of it names a directory that is to be created immediately after the
pathname is resolved.
component as in Step 2: it has to exist and resolve to a directory.
Otherwise, a trailing \(aq/\(aq is ignored.
(Or, equivalently, a pathname with a trailing \(aq/\(aq is equivalent to
the pathname obtained by appending \(aq.\(aq to it.)
.SS Final symlink
If the last component of a pathname is a symbolic link, then it
depends on the system call whether the file referred to will be

View File

@ -244,7 +244,9 @@ and
limits; see BUGS.
.\"
.SS PIPE_BUF
POSIX.1 says that writes of less than
POSIX.1 says that
.BR write (2)s
of less than
.B PIPE_BUF
bytes must be atomic: the output data is written to the pipe as a
contiguous sequence.

View File

@ -1247,8 +1247,7 @@ Alternatively,
or
.IR <wordexp.h> .
.PP
Used for a count of bytes.
It is the result of the
Used for a count of bytes. It is the result of the
.I sizeof
operator.
According to the C language standard,

View File

@ -819,7 +819,7 @@ reference to it is closed.
To pass file descriptors or credentials over a
.BR SOCK_STREAM
socket, you must
send or receive at least one byte of nonancillary data in the same
to send or receive at least one byte of nonancillary data in the same
.BR sendmsg (2)
or
.BR recvmsg (2)