fix obscure macOS issue where the Apple locale is set to something setlocale(3) doesn't understand; don't source .bash_logout if the shell is running setuid; fix for macOS issue with pipe size throttling and here-documents

This commit is contained in:
Chet Ramey
2026-07-14 09:29:04 -04:00
parent 0e16a4e4b1
commit 03e7298d1e
24 changed files with 2806 additions and 2336 deletions
+129 -126
View File
@@ -1,9 +1,9 @@
This is bash.info, produced by makeinfo version 7.3 from bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 18 May 2026).
Bash shell (version 5.3, 1 July 2026).
This is Edition 5.3, last updated 18 May 2026, of The GNU Bash
This is Edition 5.3, last updated 1 July 2026, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Copyright © 1988-2026 Free Software Foundation, Inc.
@@ -26,10 +26,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.3, 18 May 2026). The Bash home page is
Bash shell (version 5.3, 1 July 2026). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.3, last updated 18 May 2026, of The GNU Bash
This is Edition 5.3, last updated 1 July 2026, of The GNU Bash
Reference Manual, for Bash, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -5083,18 +5083,18 @@ parameters, or to display the names and values of shell variables.
Same as -x.
-p
Turn on privileged mode. In this mode, the $BASH_ENV and
$ENV files are not processed, shell functions are not
inherited from the environment, and the SHELLOPTS,
Turn on privileged mode. In this mode, Bash does not process
the $BASH_ENV and $ENV files, does not inherit shell
functions from the environment, and ignores the SHELLOPTS,
BASHOPTS, CDPATH and GLOBIGNORE variables, if they
appear in the environment, are ignored. If the shell is
started with the effective user (group) id not equal to the
real user (group) id, and the -p option is not supplied,
these actions are taken and the effective user id is set to
the real user id. If the -p option is supplied at startup,
the effective user id is not reset. Turning this option off
causes the effective user and group ids to be set to the real
user and group ids.
appear in the environment. If the shell is started with the
effective user (group) id not equal to the real user (group)
id, and the -p option is not supplied, these actions are
taken and the effective user id is set to the real user id
(*note Bash Startup Files:: for details). If the -p option
is supplied at startup, the effective user id is not reset.
Turning this option off causes the effective user and group
ids to be set to the real user and group ids.
-r
Enable restricted shell mode (*note The Restricted Shell::).
@@ -6808,13 +6808,13 @@ Invoked with unequal effective and real UID/GIDs
................................................
If Bash is started with the effective user (group) id not equal to the
real user (group) id, and the -p option is not supplied, no startup
files are read, shell functions are not inherited from the environment,
the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE variables, if
they appear in the environment, are ignored, and the effective user id
is set to the real user id. If the -p option is supplied at
invocation, the startup behavior is the same, but Bash does not reset
the effective user id.
real user (group) id, and the -p option is not supplied, Bash does not
attempt to read any startup files or ~/.bash_logout, does not inherit
shell functions from the environment, ignores the SHELLOPTS,
BASHOPTS, CDPATH, and GLOBIGNORE variables, if they appear in the
environment, and sets the effective user id to the real user id. If the
-p option is supplied at invocation, the startup behavior is the same,
but Bash does not reset the effective user id.

File: bash.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features
@@ -7623,9 +7623,9 @@ can appear in the prompt variables PS0, PS1, PS2, and PS4
\[
Begin a sequence of non-printing characters. This could be used to
embed a terminal control sequence into the prompt. This escape is
only useful when the prompt will be supplied to Readline, so it
shouldn't be used in PS0 or PS4, or when line editing is not
enabled.
only useful when the prompt will be supplied to Readline, and is
ignored and removed otherwise, so it shouldn't be used in PS0 or
PS4, or when line editing is not enabled.
\]
End a sequence of non-printing characters begun with \[
@@ -7984,100 +7984,103 @@ startup files.
supplied as an argument exceeds PATH_MAX when canonicalized, cd
will attempt to use the supplied directory name.
52. When the xpg_echo option is enabled, Bash does not attempt to
52. The command builtin prints command name arguments containing a
slash as full pathnames when the -v option is supplied.
53. When the xpg_echo option is enabled, Bash does not attempt to
interpret any arguments to echo as options. echo displays each
argument after converting escape sequences.
53. The export and readonly builtin commands display their output
54. The export and readonly builtin commands display their output
in the format required by POSIX.
54. When listing the history, the fc builtin does not include an
55. When listing the history, the fc builtin does not include an
indication of whether or not a history entry has been modified.
55. The default editor used by fc is ed.
56. The default editor used by fc is ed.
56. fc treats extra arguments as an error instead of ignoring them.
57. fc treats extra arguments as an error instead of ignoring them.
57. If there are too many arguments supplied to fc -s, fc prints
58. If there are too many arguments supplied to fc -s, fc prints
an error message and returns failure.
58. The output of kill -l prints all the signal names on a single
59. The output of kill -l prints all the signal names on a single
line, separated by spaces, without the SIG prefix.
59. The kill builtin does not accept signal names with a SIG
60. The kill builtin does not accept signal names with a SIG
prefix.
60. The kill builtin returns a failure status if any of the pid or
61. The kill builtin returns a failure status if any of the pid or
job arguments are invalid or if sending the specified signal to any
of them fails. In default mode, kill returns success if the
signal was successfully sent to any of the specified processes.
61. The printf builtin uses double (via strtod) to convert
62. The printf builtin uses double (via strtod) to convert
arguments corresponding to floating point conversion specifiers,
instead of long double if it's available. The L length
modifier forces printf to use long double if it's available.
62. The pwd builtin verifies that the value it prints is the same as
63. The pwd builtin verifies that the value it prints is the same as
the current directory, even if it is not asked to check the file
system with the -P option.
63. The read builtin may be interrupted by a signal for which a trap
64. The read builtin may be interrupted by a signal for which a trap
has been set. If Bash receives a trapped signal while executing
read, the trap handler executes and read returns an exit status
greater than 128.
64. When the set builtin is invoked without options, it does not
65. When the set builtin is invoked without options, it does not
display shell function names and definitions.
65. When the set builtin is invoked without options, it displays
66. When the set builtin is invoked without options, it displays
variable values without quotes, unless they contain shell
metacharacters, even if the result contains nonprinting characters.
66. The test builtin compares strings using the current locale when
67. The test builtin compares strings using the current locale when
evaluating the < and > binary operators.
67. The test builtin's -t unary primary requires an argument.
68. The test builtin's -t unary primary requires an argument.
Historical versions of test made the argument optional in certain
cases, and Bash attempts to accommodate those for backwards
compatibility.
68. The trap builtin displays signal names without the leading
69. The trap builtin displays signal names without the leading
SIG.
69. The trap builtin doesn't check the first argument for a possible
70. The trap builtin doesn't check the first argument for a possible
signal specification and revert the signal handling to the original
disposition if it is, unless that argument consists solely of
digits and is a valid signal number. If users want to reset the
handler for a given signal to the original disposition, they should
use - as the first argument.
70. trap -p without arguments displays signals whose dispositions
71. trap -p without arguments displays signals whose dispositions
are set to SIG_DFL and those that were ignored when the shell
started, not just trapped signals.
71. The type and command builtins will not report a non-executable
72. The type and command builtins will not report a non-executable
file as having been found, though the shell will attempt to execute
such a file if it is the only so-named file found in $PATH.
72. The ulimit builtin uses a block size of 512 bytes for the -c
73. The ulimit builtin uses a block size of 512 bytes for the -c
and -f options.
73. The unset builtin with the -v option specified returns a fatal
74. The unset builtin with the -v option specified returns a fatal
error if it attempts to unset a readonly or non-unsettable
variable, which causes a non-interactive shell to exit.
74. When asked to unset a variable that appears in an assignment
75. When asked to unset a variable that appears in an assignment
statement preceding the command, the unset builtin attempts to
unset a variable of the same name in the current or previous scope
as well. This implements the required "if an assigned variable is
further modified by the utility, the modifications made by the
utility shall persist" behavior.
75. The arrival of SIGCHLD when a trap is set on SIGCHLD does not
76. The arrival of SIGCHLD when a trap is set on SIGCHLD does not
interrupt the wait builtin and cause it to return immediately.
The trap command is run once for each child that exits.
76. Bash removes an exited background process's status from the list
77. Bash removes an exited background process's status from the list
of such statuses after the wait builtin returns it.
There is additional POSIX behavior that Bash does not implement by
@@ -13824,82 +13827,82 @@ Node: Bourne Shell Builtins155613
Node: Bash Builtins182332
Node: Modifying Shell Behavior220067
Node: The Set Builtin220409
Node: The Shopt Builtin232403
Node: Special Builtins249456
Node: Shell Variables250445
Node: Bourne Shell Variables250879
Node: Bash Variables253387
Node: Bash Features292671
Node: Invoking Bash293685
Node: Bash Startup Files300915
Node: Interactive Shells306237
Node: What is an Interactive Shell?306645
Node: Is this Shell Interactive?307307
Node: Interactive Shell Behavior308131
Node: Bash Conditional Expressions311892
Node: Shell Arithmetic317309
Node: Aliases320636
Node: Arrays323770
Node: The Directory Stack331472
Node: Directory Stack Builtins332269
Node: Controlling the Prompt336714
Node: The Restricted Shell339795
Node: Bash POSIX Mode342888
Node: Shell Compatibility Mode362704
Node: Job Control371711
Node: Job Control Basics372168
Node: Job Control Builtins378536
Node: Job Control Variables385324
Node: Command Line Editing386555
Node: Introduction and Notation388258
Node: Readline Interaction390610
Node: Readline Bare Essentials391798
Node: Readline Movement Commands393606
Node: Readline Killing Commands394602
Node: Readline Arguments396625
Node: Searching397715
Node: Readline Init File399958
Node: Readline Init File Syntax401261
Node: Conditional Init Constructs428212
Node: Sample Init File432597
Node: Bindable Readline Commands435717
Node: Commands For Moving437255
Node: Commands For History439719
Node: Commands For Text445110
Node: Commands For Killing449235
Node: Numeric Arguments452023
Node: Commands For Completion453175
Node: Keyboard Macros458871
Node: Miscellaneous Commands459572
Node: Readline vi Mode467115
Node: Programmable Completion468092
Node: Programmable Completion Builtins477828
Node: A Programmable Completion Example489565
Node: Using History Interactively494910
Node: Bash History Facilities495591
Node: Bash History Builtins499326
Node: History Interaction506921
Node: Event Designators511871
Node: Word Designators513449
Node: Modifiers515841
Node: Installing Bash517778
Node: Basic Installation518894
Node: Compilers and Options522770
Node: Compiling For Multiple Architectures523520
Node: Installation Names525273
Node: Specifying the System Type527507
Node: Sharing Defaults528253
Node: Operation Controls528967
Node: Optional Features529986
Node: Reporting Bugs542709
Node: Major Differences From The Bourne Shell544066
Node: GNU Free Documentation License565493
Node: Indexes590670
Node: Builtin Index591121
Node: Reserved Word Index598219
Node: Variable Index600664
Node: Function Index618077
Node: Concept Index632210
Node: The Shopt Builtin232441
Node: Special Builtins249494
Node: Shell Variables250483
Node: Bourne Shell Variables250917
Node: Bash Variables253425
Node: Bash Features292709
Node: Invoking Bash293723
Node: Bash Startup Files300953
Node: Interactive Shells306313
Node: What is an Interactive Shell?306721
Node: Is this Shell Interactive?307383
Node: Interactive Shell Behavior308207
Node: Bash Conditional Expressions311968
Node: Shell Arithmetic317385
Node: Aliases320712
Node: Arrays323846
Node: The Directory Stack331548
Node: Directory Stack Builtins332345
Node: Controlling the Prompt336790
Node: The Restricted Shell339909
Node: Bash POSIX Mode343002
Node: Shell Compatibility Mode362961
Node: Job Control371968
Node: Job Control Basics372425
Node: Job Control Builtins378793
Node: Job Control Variables385581
Node: Command Line Editing386812
Node: Introduction and Notation388515
Node: Readline Interaction390867
Node: Readline Bare Essentials392055
Node: Readline Movement Commands393863
Node: Readline Killing Commands394859
Node: Readline Arguments396882
Node: Searching397972
Node: Readline Init File400215
Node: Readline Init File Syntax401518
Node: Conditional Init Constructs428469
Node: Sample Init File432854
Node: Bindable Readline Commands435974
Node: Commands For Moving437512
Node: Commands For History439976
Node: Commands For Text445367
Node: Commands For Killing449492
Node: Numeric Arguments452280
Node: Commands For Completion453432
Node: Keyboard Macros459128
Node: Miscellaneous Commands459829
Node: Readline vi Mode467372
Node: Programmable Completion468349
Node: Programmable Completion Builtins478085
Node: A Programmable Completion Example489822
Node: Using History Interactively495167
Node: Bash History Facilities495848
Node: Bash History Builtins499583
Node: History Interaction507178
Node: Event Designators512128
Node: Word Designators513706
Node: Modifiers516098
Node: Installing Bash518035
Node: Basic Installation519151
Node: Compilers and Options523027
Node: Compiling For Multiple Architectures523777
Node: Installation Names525530
Node: Specifying the System Type527764
Node: Sharing Defaults528510
Node: Operation Controls529224
Node: Optional Features530243
Node: Reporting Bugs542966
Node: Major Differences From The Bourne Shell544323
Node: GNU Free Documentation License565750
Node: Indexes590927
Node: Builtin Index591378
Node: Reserved Word Index598476
Node: Variable Index600921
Node: Function Index618334
Node: Concept Index632467

End Tag Table