Compare commits

...

12 Commits

Author SHA1 Message Date
Michael Kerrisk 77a4c23215 mount_namespaces.7: Update references to Documentation/filesystems/sharedsubtree.rst
Documentation/filesystems/sharedsubtree.txt has changed to
Documentation/filesystems/sharedsubtree.rst.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 03:06:52 +02:00
Michael Kerrisk 8a5fc410a9 proc.5: Fixes various references to kernel docs in Documentation/
Especially the change to .rst format in the kernel Documentation/
tree has rendered many of the references in this manual page
obsolete. Fix them.

Reported-by: Vito Caputo <vcaputo@pengaru.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 03:06:45 +02:00
Alejandro Colomar 77251857af operator.7: Reorder symbols as in the standard (C11)
This makes it easier to compare this page to the standard,
to get more details about the rules between operators.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Alejandro Colomar 9c9a5acaa2 operator.7: Fix precedence of the 'cast operator'
Unary operators are mentioned in C11::6.5.3, and casts are in
C11::6.5.4 (they are mentioned in order of precedence).

And from note 85 (in section 6.5) in that same C11 standard, major
subsections 6.5.X are sorted by precedence.

As an example (from Jakub), `sizeof(int)+1` is interpreted as
`(sizeof(int))+1`, and not `sizeof((int)+1)`.

I used C11 and not C18 (the latest) because at least in the draft
copy of C18 that I have, there are a few important typos in that
section, while the draft copy of C11 that I have is free of those
typos.  And C11 and C18 are almost identical, with no major
changes to the language.

Reported-by: David Sletten <david.paul.sletten@gmail.com>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Pali Rohár 15af0ac10a termios.3: Use bold style for B0
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Michael Kerrisk 847487d17f termios.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Pali Rohár 4d3e4af379 termios.3: Clarify zero argument for cfsetispeed()
Zero in this case refers to literal constant 0 and not symbolic
constant B0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Michael Kerrisk f45affce7f Changes.old: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Michael Kerrisk bf4f7a7867 exit_group.2: Remove a confusing reference to _exit(2) in DESCRIPTION
As noted by Jakub:

    BTW, the exit_group.2 man page could use an update (possibly
    by merging it into exit.2): it says that the "system
    call is is equivalent to _exit(2) except that it terminates
    not only the calling thread, but all threads in the calling
    process's thread group", which isn't helpful these days.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 01:21:39 +02:00
Michael Kerrisk db141dbfca exit_group.2: SEE ALSO: s/exit(2)/_exit(2)/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 01:21:38 +02:00
Michael Kerrisk d99b5be0d8 _exit.2: Clarify the distinction between the raw syscall and the wrapper function
Further clarify the difference between the raw _exit() system call
and the C library wrapper.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 01:21:36 +02:00
Pali Rohár 44803dd03b ioctl_tty.2: TIOCGSID is equivalent to tcgetsid()
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-30 23:15:14 +02:00
8 changed files with 55 additions and 29 deletions

View File

@ -54783,7 +54783,7 @@ Changes to individual pages
iconv.1 iconv.1
iconvconfig.8 iconvconfig.8
Michael Kerrisk [Christopher Yeleighton] Michael Kerrisk [Christopher Yeleighton]
FILES: note that files may be under /usr/lib64 rather than /lib/64 FILES: note that files may be under /usr/lib64 rather than /usr/lib
See https://bugzilla.kernel.org/show_bug.cgi?id=214163 See https://bugzilla.kernel.org/show_bug.cgi?id=214163
ldd.1 ldd.1

View File

@ -112,14 +112,14 @@ canceled upon
.BR _exit (), .BR _exit (),
is implementation-dependent. is implementation-dependent.
.SS C library/kernel differences .SS C library/kernel differences
In glibc up to version 2.3, the The text above in DESCRIPTION describes the traditional effect of
.BR _exit () .BR _exit (),
wrapper function invoked the kernel system call of the same name. which is to terminate a process,
Since glibc 2.3, the wrapper function invokes and these are the semantics specified by POSIIX.1 and implemented
.BR exit_group (2), by the C library wrapper function.
in order to terminate all of the threads in a process. On modern systems, this means termination of all threads in the process.
.PP .PP
The raw By contrast with the C library wrapper function, the raw Linux
.BR _exit () .BR _exit ()
system call terminates only the calling thread, and actions such as system call terminates only the calling thread, and actions such as
reparenting child processes or sending reparenting child processes or sending
@ -127,6 +127,13 @@ reparenting child processes or sending
to the parent process are performed only if this is to the parent process are performed only if this is
the last thread in the thread group. the last thread in the thread group.
.\" _exit() is used by pthread_exit() to terminate the calling thread .\" _exit() is used by pthread_exit() to terminate the calling thread
.PP
In glibc up to version 2.3, the
.BR _exit ()
wrapper function invoked the kernel system call of the same name.
Since glibc 2.3, the wrapper function invokes
.BR exit_group (2),
in order to terminate all of the threads in a process.
.SH SEE ALSO .SH SEE ALSO
.BR execve (2), .BR execve (2),
.BR exit_group (2), .BR exit_group (2),

View File

@ -39,9 +39,7 @@ glibc provides no wrapper for
necessitating the use of necessitating the use of
.BR syscall (2). .BR syscall (2).
.SH DESCRIPTION .SH DESCRIPTION
This system call is equivalent to This system call terminates all threads
.BR _exit (2)
except that it terminates not only the calling thread, but all threads
in the calling process's thread group. in the calling process's thread group.
.SH RETURN VALUE .SH RETURN VALUE
This system call does not return. This system call does not return.
@ -54,4 +52,4 @@ Since glibc 2.3, this is the system call invoked when the
.BR _exit (2) .BR _exit (2)
wrapper function is called. wrapper function is called.
.SH SEE ALSO .SH SEE ALSO
.BR exit (2) .BR _exit (2)

View File

@ -386,6 +386,9 @@ Set the foreground process group ID of this terminal.
Argument: Argument:
.BI "pid_t *" argp .BI "pid_t *" argp
.IP .IP
When successful, equivalent to
.IR "*argp = tcgetsid(fd)" .
.IP
Get the session ID of the given terminal. Get the session ID of the given terminal.
This fails with the error This fails with the error
.B ENOTTY .B ENOTTY

View File

@ -987,7 +987,9 @@ constant is defined prior to using it.
The zero baud rate, The zero baud rate,
.BR B0 , .BR B0 ,
is used to terminate the connection. is used to terminate the connection.
If B0 is specified, the modem control lines shall no longer be asserted. If
.B B0
is specified, the modem control lines shall no longer be asserted.
Normally, this will disconnect the line. Normally, this will disconnect the line.
.B CBAUDEX .B CBAUDEX
is a mask is a mask
@ -1017,7 +1019,11 @@ which must be specified as one of the
.BI B nnn .BI B nnn
constants listed above for constants listed above for
.BR cfsetospeed (). .BR cfsetospeed ().
If the input baud rate is set to zero, the input baud rate will be If the input baud rate is set to the literal constant
.B 0
(not the symbolic constant
.BR B0 ),
the input baud rate will be
equal to the output baud rate. equal to the output baud rate.
.PP .PP
.BR cfsetspeed () .BR cfsetspeed ()

View File

@ -1519,8 +1519,11 @@ See
for a description of these fields. for a description of these fields.
Parsers should ignore all unrecognized optional fields. Parsers should ignore all unrecognized optional fields.
.IP .IP
For more information on mount propagation see: For more information on mount propagation see
.I Documentation/filesystems/sharedsubtree.rst
(or
.I Documentation/filesystems/sharedsubtree.txt .I Documentation/filesystems/sharedsubtree.txt
before Linux 5.8)
in the Linux kernel source tree. in the Linux kernel source tree.
.TP .TP
.IR /proc/[pid]/mounts " (since Linux 2.4.19)" .IR /proc/[pid]/mounts " (since Linux 2.4.19)"
@ -3159,7 +3162,10 @@ This can be used by MAKEDEV scripts for consistency with the kernel.
.IR /proc/diskstats " (since Linux 2.5.69)" .IR /proc/diskstats " (since Linux 2.5.69)"
This file contains disk I/O statistics for each disk device. This file contains disk I/O statistics for each disk device.
See the Linux kernel source file See the Linux kernel source file
.I ./Documentation/admin\-guide/iostats.rst
(or
.I Documentation/iostats.txt .I Documentation/iostats.txt
before Linux 5.3)
for further information. for further information.
.TP .TP
.I /proc/dma .I /proc/dma
@ -3831,9 +3837,11 @@ The format of this file is documented in
.I /proc/mtrr .I /proc/mtrr
Memory Type Range Registers. Memory Type Range Registers.
See the Linux kernel source file See the Linux kernel source file
.I Documentation/x86/mtrr.rst
(or
.I Documentation/x86/mtrr.txt .I Documentation/x86/mtrr.txt
.\" commit 7225e75144b9718cbbe1820d9c011c809d5773fd .\" commit 7225e75144b9718cbbe1820d9c011c809d5773fd
(or before Linux 5.2, or
.I Documentation/mtrr.txt .I Documentation/mtrr.txt
before Linux 2.6.28) before Linux 2.6.28)
for details. for details.
@ -4375,7 +4383,10 @@ Using other separators leads to the error
This directory may contain files with application binary information. This directory may contain files with application binary information.
.\" On some systems, it is not present. .\" On some systems, it is not present.
See the Linux kernel source file See the Linux kernel source file
.I Documentation/sysctl/abi.rst
(or
.I Documentation/sysctl/abi.txt .I Documentation/sysctl/abi.txt
before Linux 5.3)
for more information. for more information.
.TP .TP
.I /proc/sys/debug .I /proc/sys/debug
@ -6843,9 +6854,9 @@ of thing that needs to be updated very often.
.BR sysctl (8) .BR sysctl (8)
.PP .PP
The Linux kernel source files: The Linux kernel source files:
.IR Documentation/filesystems/proc.txt , .IR Documentation/filesystems/proc.rst ,
.IR Documentation/sysctl/fs.txt , .IR Documentation/admin\-guide/sysctl/fs.rst ,
.IR Documentation/sysctl/kernel.txt , .IR Documentation/admin\-guide/sysctl/kernel.rst ,
.IR Documentation/sysctl/net.txt , .IR Documentation/admin\-guide/sysctl/net.rst ,
and and
.IR Documentation/sysctl/vm.txt . .IR Documentation/admin\-guide/sysctl/vm.rst .

View File

@ -701,7 +701,7 @@ as for a bind operation on each mount in the subtree.
(Unbindable mounts are automatically pruned at the target mount point.) (Unbindable mounts are automatically pruned at the target mount point.)
.PP .PP
For further details, see For further details, see
.I Documentation/filesystems/sharedsubtree.txt .I Documentation/filesystems/sharedsubtree.rst
in the kernel source tree. in the kernel source tree.
.\" .\"
.SS Move (MS_MOVE) semantics .SS Move (MS_MOVE) semantics
@ -743,7 +743,7 @@ dest(B) shared shared shared slave+shared invalid
Note: moving a mount that resides under a shared mount is invalid. Note: moving a mount that resides under a shared mount is invalid.
.PP .PP
For further details, see For further details, see
.I Documentation/filesystems/sharedsubtree.txt .I Documentation/filesystems/sharedsubtree.rst
in the kernel source tree. in the kernel source tree.
.\" .\"
.SS Mount semantics .SS Mount semantics
@ -1039,7 +1039,7 @@ For a discussion of propagation types when moving mounts
and creating bind mounts and creating bind mounts
.RB ( MS_BIND ), .RB ( MS_BIND ),
see see
.IR Documentation/filesystems/sharedsubtree.txt . .IR Documentation/filesystems/sharedsubtree.rst .
.\" .\"
.\" ============================================================ .\" ============================================================
.\" .\"
@ -1346,5 +1346,5 @@ See
.BR pivot_root (8), .BR pivot_root (8),
.BR umount (8) .BR umount (8)
.PP .PP
.IR Documentation/filesystems/sharedsubtree.txt .IR Documentation/filesystems/sharedsubtree.rst
in the kernel source tree. in the kernel source tree.

View File

@ -47,12 +47,13 @@ This manual page lists C operators and their precedence in evaluation.
lb lb lb lb lb lb
l l l. l l l.
Operator Associativity Notes Operator Associativity Notes
() [] \-> . ++ \-\- left to right [1] [] () . \-> ++ \-\- left to right [1]
! \(ti ++ \-\- + \- (type) * & sizeof right to left [2] ++ \-\- & * + \- \(ti ! sizeof right to left [2]
(type) right to left
* / % left to right * / % left to right
+ \- left to right + \- left to right
<< >> left to right << >> left to right
< <= > >= left to right < > <= >= left to right
== != left to right == != left to right
& left to right & left to right
\(ha left to right \(ha left to right
@ -60,7 +61,7 @@ Operator Associativity Notes
&& left to right && left to right
|| left to right || left to right
?: right to left ?: right to left
= += \-= *= /= %= <<= >>= &= \(ha= |= right to left = *= /= %= += \-= <<= >>= &= \(ha= |= right to left
, left to right , left to right
.TE .TE
.PP .PP