#
a35d3535 |
| 22-Nov-2010 |
Dimitry Andric <dim@FreeBSD.org> |
Sync: merge r215464 through r215708 from ^/head.
|
#
aeb5d065 |
| 20-Nov-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Code size optimizations to buffered output.
This is mainly less use of the outc macro.
No functional change is intended, but code size is about 2K less on i386.
|
#
b9f2f8c3 |
| 01-Nov-2010 |
Dimitry Andric <dim@FreeBSD.org> |
Sync: merge r214353 through r214648 from ^/head.
|
#
4c4164f9 |
| 31-Oct-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Reindent evaltree().
|
#
dca867f1 |
| 31-Oct-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Use iteration instead of recursion to evaluate semicolon lists. This reduces CPU and memory usage when executing long lists (such as long functions).
|
#
274110df |
| 29-Oct-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Tweak some string constants to reduce code size.
* Reduce some needless differences. * Shorten some error messages that should not happen.
|
#
88328642 |
| 14-Oct-2010 |
David E. O'Brien <obrien@FreeBSD.org> |
In the spirit of r90111, depend on c89 and remove the "STATIC" macro and its usage.
|
#
aa7b6f82 |
| 13-Oct-2010 |
David E. O'Brien <obrien@FreeBSD.org> |
Consistently use "STATIC" for all functions in order to be able to set breakpoints with in a debugger. And use naked "static" for variables.
Noticed by: bde
|
#
8f2dc7de |
| 11-Sep-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Fix exit status if return is used within a loop condition.
|
#
27542743 |
| 04-Sep-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Get rid of some magic numbers.
MFC after: 1 week
|
#
c5e4fa99 |
| 13-Aug-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Add a forgotten const.
|
#
b84d7af7 |
| 04-Aug-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Return 0 from eval if no command was given.
This makes a difference if there is a command substitution.
To make this work, evalstring() has been changed to set exitstatus to 0 if no command was
sh: Return 0 from eval if no command was given.
This makes a difference if there is a command substitution.
To make this work, evalstring() has been changed to set exitstatus to 0 if no command was executed (the string contained only whitespace).
Example: eval $(false); echo $? should print 0.
show more ...
|
Revision tags: release/8.1.0_cvs, release/8.1.0 |
|
#
c1564db0 |
| 29-May-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Recognize "--" in . and exec.
Although "--" historically has not been required to be recognized for certain special builtins that do not take options in POSIX, some other implementations recogni
sh: Recognize "--" in . and exec.
Although "--" historically has not been required to be recognized for certain special builtins that do not take options in POSIX, some other implementations recognize options for them, requiring scripts to use "--" or avoid operands starting with "-".
Operands starting with "-" can be avoided with eval by prepending a space, and cannot occur with break, continue, exit, return and shift as they only take numbers, nor with times as it does not take operands. With . and exec, avoiding "-" is not so easy as it may require reimplementing the PATH search; therefore the current proposal for POSIX is to require recognition of "--" for them.
We continue to accept other strings starting with "-" as operands to . and exec, and also "--" if it is alone to . (which would otherwise be invalid anyway).
show more ...
|
#
35ad337d |
| 08-May-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Have only one copy of _PATH_STDPATH in the binary.
|
#
945f418a |
| 06-May-2010 |
Kirk McKusick <mckusick@FreeBSD.org> |
Final update to current version of head in preparation for reintegration.
|
#
e4b50334 |
| 05-May-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.
This allows doing things like LC_ALL=C some_builtin to run a builtin under a different locale, just like is possible with ex
sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var.
This allows doing things like LC_ALL=C some_builtin to run a builtin under a different locale, just like is possible with external programs. The immediate reason is that this allows making printf(1) a builtin without breaking things like LC_NUMERIC=C printf '%f\n' 1.2
This change also affects special builtins, as even though the assignment is persistent, the export is only to the builtin (unless the variable was already exported).
Note: for this to work for builtins that also exist as external programs such as /bin/test, the setlocale() call must be under #ifndef SHELL. The shell will do the setlocale() calls which may not agree with the environment variables.
show more ...
|
#
a4bf5fb9 |
| 28-Apr-2010 |
Kirk McKusick <mckusick@FreeBSD.org> |
Update to current version of head.
|
Revision tags: release/7.3.0_cvs, release/7.3.0 |
|
#
c3bb8589 |
| 14-Mar-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Do not abort on a redirection error on a compound command.
Redirection errors on subshells already did not abort the shell because the redirection is executed in the subshell.
Other shells seem
sh: Do not abort on a redirection error on a compound command.
Redirection errors on subshells already did not abort the shell because the redirection is executed in the subshell.
Other shells seem to agree that these redirection errors should not abort the shell.
Also ensure that the redirections will be cleaned up properly in cases like command eval '{ shift x; } 2>/dev/null'
Example: { echo bad; } </var/empty/x; echo good
show more ...
|
#
3a64dbc2 |
| 13-Mar-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Do not abort on a redirection error if there is no command word.
Although simple commands without a command word (only assignments and/or redirections) are much like special builtins, POSIX and
sh: Do not abort on a redirection error if there is no command word.
Although simple commands without a command word (only assignments and/or redirections) are much like special builtins, POSIX and most shells seem to agree that redirection errors should not abort the shell in this case. Of course, the assignments persist and assignment errors are fatal.
To get the old behaviour portably, use the ':' special builtin. To get the new behaviour portably, given that there are no assignments, use the 'true' regular builtin.
show more ...
|
#
17490974 |
| 06-Mar-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Make sure to popredir() even if a function caused an error.
|
#
544754df |
| 06-Mar-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Make sure to popredir() even if a special builtin caused an error.
|
#
c848bc18 |
| 06-Mar-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Improve the command builtin: * avoid unnecessary fork * allow executing builtins via command * executing a special builtin via command removes its special properties
Obtained from: NetBSD (parts)
|
#
1a0fda2b |
| 04-Mar-2010 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
IFH@204581
|
#
9199c09a |
| 06-Jan-2010 |
Warner Losh <imp@FreeBSD.org> |
Merge from head at r201628.
# This hasn't been tested, and there are at least three bad commits # that need to be backed out before the branch will be stable again.
|
#
dc82a6f6 |
| 03-Jan-2010 |
Jilles Tjoelker <jilles@FreeBSD.org> |
sh: Send the "not found" message for builtin <cmd> to redirected fd 2.
|