DragonFly commits List (threaded) for 2007-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/bin/sh builtins.def eval.c eval.h exec.c exec.h mkbuiltins options.c sh.1 var.c var.h
pavalos 2007/01/06 17:14:54 PST
DragonFly src repository
Modified files:
bin/sh builtins.def eval.c eval.h exec.c exec.h
mkbuiltins options.c sh.1 var.c var.h
Log:
Use -s to flag POSIX's "special built-in" utilities in builtins.def. Add a
new member to struct builtincmd and set it to 1 if -s was specified. This
is done because there are cases where special builtins must be treated
differently from other builtins.
Implement some of the differences between special built-ins and other builtins
demanded by POSIX.
- A redirection error is only fatal (meaning the execution of a shell script is
terminated) for special built-ins. Previously it was fatal for all shell
builtins, causing problems like the one reported in FreeBSD PR 88845.
- Variable assignments remain in effect for special built-ins.
- Option or operand errors are only fatal for special built-ins.
Add the times builtin. It reports the user and system time for the shell
itself and its children. Instead of calling times() (as implied by POSIX) this
implementation directly calls getrusage() to get the times because this is more
convenient.
Print pointers with %p rather than casting them to long.
Replace home-grown dup2() implementation with actual dup2() calls. This
should slightly reduce the number of system calls in critical portions of
the shell, and select a more efficient path through the fdalloc code.
Implement the PS4 variable which is defined by the POSIX User Portability
Utilities option. Its value is printed at the beginning of the line if tracing
(-x) is active. PS4 defaults to the string "+ " which is compatible with the
old behaviour to always print "+ ".
Don't crash on "<cmd> | { }".
Remove some white space at EOL.
Add the POSIX options -v and -V to the 'command' builtin. Both describe the
type of their argument, if it is a shell function, an alias, a builtin, etc.
-V is more verbose than -v.
Do not assume there is only a space between #define and the macro name
when grepping for JOBS in mkbuiltins
Obtained-from: FreeBSD
Revision Changes Path
1.3 +25 -21 src/bin/sh/builtins.def
1.10 +70 -35 src/bin/sh/eval.c
1.4 +2 -1 src/bin/sh/eval.h
1.10 +57 -16 src/bin/sh/exec.c
1.5 +10 -2 src/bin/sh/exec.h
1.4 +12 -5 src/bin/sh/mkbuiltins
1.6 +1 -1 src/bin/sh/options.c
1.6 +9 -3 src/bin/sh/sh.1
1.13 +3 -0 src/bin/sh/var.c
1.5 +2 -0 src/bin/sh/var.h
http://www.dragonflybsd.org/cvsweb/src/bin/sh/builtins.def.diff?r1=1.2&r2=1.3&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/eval.c.diff?r1=1.9&r2=1.10&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/eval.h.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/exec.c.diff?r1=1.9&r2=1.10&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/exec.h.diff?r1=1.4&r2=1.5&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/mkbuiltins.diff?r1=1.3&r2=1.4&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/options.c.diff?r1=1.5&r2=1.6&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/sh.1.diff?r1=1.5&r2=1.6&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/var.c.diff?r1=1.12&r2=1.13&f=u
http://www.dragonflybsd.org/cvsweb/src/bin/sh/var.h.diff?r1=1.4&r2=1.5&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]