History log of /freebsd/bin/sh/main.c (Results 51 – 75 of 167)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 23090366 04-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Sync from head


# d902a66b 14-Sep-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Reduce code duplication: use setinputfile instead of open/setinputfd
combination.

MFC after: 2 weeks


Revision tags: release/8.3.0_cvs, release/8.3.0
# 8fa0b743 23-Jan-2012 Xin LI <delphij@FreeBSD.org>

IFC @230489 (pending review).


# 80dbff4e 04-Jan-2012 Sean Bruno <sbruno@FreeBSD.org>

IFC to head to catch up the bhyve branch

Approved by: grehan@


Revision tags: release/9.0.0
# 260fc3f4 01-Jan-2012 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Make various functions static.


# 935205e2 17-Jul-2011 Justin T. Gibbs <gibbs@FreeBSD.org>

Integrate from Head into ZFSD feature branch as of revision r224141.


# a5615c90 28-Jun-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r222830


# 49f5aeaf 15-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 454a02b3 13-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix duplicate prototypes for builtins.

Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicat

sh: Fix duplicate prototypes for builtins.

Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicating prototypes for *cmd functions in other headers.

show more ...


# b8764e51 13-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# c5f4fe06 12-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Read .profile from the home directory (or / if HOME is not set).

In most cases, login shells are started from the home directory, but not in
all, such as xterm -ls.

This commit depends on r2229

sh: Read .profile from the home directory (or / if HOME is not set).

In most cases, login shells are started from the home directory, but not in
all, such as xterm -ls.

This commit depends on r222957 for read_profile() performing parameter
expansion.

PR: bin/50569

show more ...


# 1a62d884 11-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Do parameter expansion on ENV before using it.

This is required by POSIX, and allows things like ENV=\$HOME/.shrc.

Note that tilde expansion is explicitly not performed.


# 3bce356e 05-Jun-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 47a5ab29 04-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Reduce more needless differences between error messages.


# 87c3644c 24-May-2011 Peter Grehan <grehan@FreeBSD.org>

IFC @ r222256


# 8c4431d0 22-May-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# c9e93e67 22-May-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Fix bss-based buffer overflow in . builtin.

If the length of a directory in PATH together with the given filename
exceeded FILENAME_MAX (which may happen even for pathnames that work), a
static

sh: Fix bss-based buffer overflow in . builtin.

If the length of a directory in PATH together with the given filename
exceeded FILENAME_MAX (which may happen even for pathnames that work), a
static buffer was overflown.

The static buffer is unnecessary, we can use the stalloc() stack.

Obtained from: NetBSD
MFC after: 1 week

show more ...


# 50cac029 09-May-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 07eb7033 08-May-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Add \u/\U support (in $'...') for UTF-8.

Because we have no iconv in base, support for other charsets is not
possible.

Note that \u/\U are processed using the locale that was active when the
sh

sh: Add \u/\U support (in $'...') for UTF-8.

Because we have no iconv in base, support for other charsets is not
possible.

Note that \u/\U are processed using the locale that was active when the
shell started. This is necessary to avoid behaviour that depends on the
parse/execute split (for example when placing braces around an entire
script). Therefore, UTF-8 encoding is implemented manually.

show more ...


# b9f714be 08-May-2011 Attilio Rao <attilio@FreeBSD.org>

MFC


# 6ed74a0a 07-May-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Track if the current locale's charset is UTF-8 or not.


# 45496405 24-Apr-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Allow EV_EXIT through function calls, make {...} <redir more consistent.

If EV_EXIT causes an exit, use the exception mechanism to unwind
redirections and local variables. This way, if the final

sh: Allow EV_EXIT through function calls, make {...} <redir more consistent.

If EV_EXIT causes an exit, use the exception mechanism to unwind
redirections and local variables. This way, if the final command is a
redirected command, an EXIT trap now executes without the redirections.

Because of these changes, EV_EXIT can now be inherited by the body of a
function, so do so. This means that a function no longer prevents a fork
before an exec being skipped, such as in
f() { head -1 /etc/passwd; }; echo $(f)

Wrapping a single builtin in a function may still cause an otherwise
unnecessary fork with command substitution, however.

An exit command or -e failure still invokes the EXIT trap with the
original redirections and local variables in place.

Note: this depends on SHELLPROC being gone. A SHELLPROC depended on
keeping the redirections and local variables and only cleaning up the
state to restore them.

show more ...


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# 3835f47c 04-Feb-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Remove special code for shell scripts without magic number.

These are called "shell procedures" in the source.

If execve() failed with [ENOEXEC], the shell would reinitialize itself
and execute

sh: Remove special code for shell scripts without magic number.

These are called "shell procedures" in the source.

If execve() failed with [ENOEXEC], the shell would reinitialize itself
and execute the program as a script. This requires a fair amount of code
which is not frequently used (most scripts have a #! magic number).
Therefore just execute a new instance of sh (_PATH_BSHELL) to run the
script.

show more ...


# 70df11ea 09-Jan-2011 Jilles Tjoelker <jilles@FreeBSD.org>

sh: Make exit without parameters from EXIT trap POSIX-compliant.

It should use the original exit status, just like falling off the
end of the trap handler.

Outside an EXIT trap, 'exit' is still equ

sh: Make exit without parameters from EXIT trap POSIX-compliant.

It should use the original exit status, just like falling off the
end of the trap handler.

Outside an EXIT trap, 'exit' is still equivalent to 'exit $?'.

show more ...


# a35d3535 22-Nov-2010 Dimitry Andric <dim@FreeBSD.org>

Sync: merge r215464 through r215708 from ^/head.


1234567