]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Ensure the same command input file is on top after executing a builtin.
authorjilles <jilles@FreeBSD.org>
Sun, 22 Nov 2009 14:04:20 +0000 (14:04 +0000)
committerjilles <jilles@FreeBSD.org>
Sun, 22 Nov 2009 14:04:20 +0000 (14:04 +0000)
commit20812b17e03ee11696a188bf6ff7052d42c72df8
tree0ba1f228ffeefae0838e106fccaf6a76f2040cce
parent9b1c5e3514335e3055a2653349323a1a8a9220c0
sh: Ensure the same command input file is on top after executing a builtin.

This avoids weirdness when 'fc -e vi' or the like is done and there is a
syntax error in the file. Formerly an interactive shell tried to execute
stuff after the syntax error and exited.

This should also avoid similar issues with 'command eval' and 'command .'
when 'command' is implemented properly as in NetBSD sh.

Special builtins did not have this problem since errors in them cause the
shell to exit or to reset various state such as the current command input
file.
bin/sh/eval.c
bin/sh/input.c
bin/sh/input.h
tools/regression/bin/sh/builtins/fc1.0 [new file with mode: 0644]