| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
quotation. Also make sure we have the same amount of columns in each row as
the number of columns we specify in the head arguments.
Reviewed by: brueffer
|
|
|
|
|
| |
Reported by: Kristof Provost
MFC after: 1 week
|
|
|
|
|
| |
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
outer if condition)
Reviewed by: se
Approved by: cperciva
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
| |
PR: bin/165321
Approved by: gjb
MFC after: 3 days
|
|
|
|
|
|
|
| |
PR: bin/165321
Submitted by: jhs
Approved by: bcr
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
o Wrap sentences on to new lines
o Cleanup trailing whitespace
Found with: textproc/igor
MFC after: 1 week
X-MFC-With: r232157
|
|
|
|
|
|
| |
Submitted by: amdmi3
PR: 165431
MFC after: 1 week
|
| |
|
|
|
|
| |
Reported by: lme
|
|
|
|
|
|
|
| |
A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no redirections or variable assignments, non-interactive shell, no job
control). These restrictions limit the amount of code executed in a vforked
child.
There is a large speedup (for example 35%) in microbenchmarks. The
difference in buildkernel is smaller (for example 0.5%) but still
statistically significant. See
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html
for some numbers.
The use of vfork() can be disabled by setting a variable named
SH_DISABLE_VFORK.
|
| |
|
|
|
|
|
|
| |
In the first command of a 'for', $? should be the exit status of the last
pipeline (command substitution in the word list or command before 'for'),
not always 0.
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
| |
Simply annotate the function parameters with __unused, instead of adding
the ve-variables. This makes the code build with GCC 4.7 and -Werror.
|
|
|
|
|
|
|
|
|
|
|
| |
Before this fix, only the first statement of the trap was executed if
evalskip was set. This is for example the case when:
o "-e" is set for this shell
o a trap is set on EXIT
o a function returns 1 and causes the script to abort
Reviewed by: jilles
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, rework evalcase() to not evaluate any tree. Instead, return the
NCLISTFALLTHRU node and handle it in evaltree().
Fixed bugs:
* If a ;& list with non-zero exit status is followed by an empty ;; or final
list, the exit status of the case command should be equal to the exit
status of the ;& list, not 0.
* An empty ;& case should not reset $?.
|
|
|
|
|
|
|
| |
* If no pattern is matched, POSIX says the exit status shall be 0 (even if
there are command substitutions).
* If a pattern is matched and there are no command substitutions, the first
command should see the $? from before the case command, not always 0.
|
|
|
|
| |
PR: bin/161756
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
The errno message display added in r222292 did not take attempting to
cd to a non-directory or something that cannot be stat()ed into account.
PR: bin/164070
MFC after: 10 days
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This improves performance for globs where a slash or another component
follows a component with metacharacters by eliminating unnecessary attempts
to open directories that are not.
|
| |
|
|
|
|
|
|
|
|
|
| |
This is not necessary: errors are already caught in evalbackcmd() and
forcelocal handles changes to variables.
Note that this depends on r223024.
MFC after: 4 weeks
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
| |
All other global variables are already marked static, so for consistency
sake, add them to these three arrays as well.
|
|
|
|
|
| |
The `struct modes' are only used by the getter-functions in the same
file, so we can safely mark them static and const.
|
| |
|
|
|
|
|
|
|
| |
Free expanded case text before executing commands.
Remove impossible evalskip checks (expanding an argument cannot set
evalskip anymore since $(break) and the like are properly executed in a
subshell environment).
|
| |
|
|
|
|
| |
Spotted by: arundel
|
|
|
|
| |
MFC after: 2 weeks
|
|
|
|
| |
Note that only assigning the decimal value 1 resets getopts, as before.
|
|
|
|
| |
With i386 base gcc and i386 base clang, arith_yacc.o remains unchanged.
|
| |
|
|
|
|
|
|
| |
For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.
|
|
|
|
|
|
| |
instead of "?".
Submitted by: arundel
|
|
|
|
|
|
|
| |
display() to calculate column widths, but was not initialized in
main(). This resulted in a division by zero.
Noticed by: Michael Butler <imb@protected-networks.net>
|
|
|
|
|
|
|
| |
units (as returned by stat(2)) instead of BLOCKSIZE units.
Submitted by: Paul Schenkeveld
MFC after: 3 weeks
|
|
|
|
| |
MFC after: 3 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- In the argc == 0 case, just populate the mount list as before, but
do not calculate widths, update totals or print anything.
- In the argv > 0 case, collect information about the requested file
systems and store it in the mount list, but do not calculate
widths, update totals or print anything.
- In either case, once all the information has been collected,
iterate once through the mount list to calculate widths and totals,
then once more to print everything.
This also fixes two bugs: firstly, column widths were not calculated
correctly if more than one file system was specified on the command
line; and secondly, file systems with MNT_IGNORE were included in the
totals even if -a was not specified.
Noticed by: Paul Schenkeveld
MFC after: 3 weeks
|