[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/53919 CVS commit: src/bin/sh
The following reply was made to PR bin/53919; it has been noted by GNATS.
From: "Robert Elz" <kre%netbsd.org@localhost>
Subject: PR/53919 CVS commit: src/bin/sh
Date: Mon, 4 Feb 2019 11:16:41 +0000
Module Name: src
Committed By: kre
Date: Mon Feb 4 11:16:41 UTC 2019
src/bin/sh: error.c error.h eval.c eval.h main.c parser.c sh.1
Suppress shell error messages while expanding $ENV (which also causes
errors while expanding $PS1 $PS2 and $PS4 to be suppressed as well).
This allows any random garbage that happens to be in ENV to not
cause noise when the shell starts (which is effectively all it did).
On a parse error (for any of those vars) we also use "" as the result,
which will be a null prompt, and avoid attempting to open any file for ENV.
This does not in any way change what happens for a correctly parsed command
substitution (either when it is executed when permitted for one of the
prompts, or when it is not (which is always for ENV)) and commands run
from those can still produce error output (but shell errors remain suppressed).
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/bin/sh/error.c
cvs rdiff -u -r1.21 -r1.22 src/bin/sh/error.h
cvs rdiff -u -r1.170 -r1.171 src/bin/sh/eval.c
cvs rdiff -u -r1.22 -r1.23 src/bin/sh/eval.h
cvs rdiff -u -r1.80 -r1.81 src/bin/sh/main.c
cvs rdiff -u -r1.164 -r1.165 src/bin/sh/parser.c
cvs rdiff -u -r1.217 -r1.218 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |