From fdbb7e848173725dfd4221d39cf72c64d79e1f09 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Tue, 12 May 2020 14:08:52 -0400 Subject: [PATCH] commit bash-20200508 snapshot --- jobs.c | 1 + parse.y | 3 ++- tests/arith-for.right | 8 ++++---- tests/errors.right | 12 ++++++------ tests/new-exp.right | 2 +- tests/parser.right | 14 +++++++------- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/jobs.c b/jobs.c index ba26670c..1a3f3a47 100644 --- a/jobs.c +++ b/jobs.c @@ -2126,6 +2126,7 @@ list_all_jobs (format) pid_t make_child (command, flags) char *command; + int flags; { int async_p, forksleep; sigset_t set, oset, termset, chldset, oset_copy; diff --git a/parse.y b/parse.y index 873bd596..b06809c6 100644 --- a/parse.y +++ b/parse.y @@ -2325,7 +2325,7 @@ shell_getc (remove_quoted_newline) i = truncating = 0; shell_input_line_terminator = 0; - /* If the shell is interatctive, but not currently printing a prompt + /* If the shell is interactive, but not currently printing a prompt (interactive_shell && interactive == 0), we don't want to print notifies or cleanup the jobs -- we want to defer it until we do print the next prompt. */ @@ -2620,6 +2620,7 @@ pop_alias: if (SHOULD_PROMPT ()) prompt_again (); line_number++; + /* What do we do here if we're expanding an alias whose definition includes an escaped newline? If that's the last character in the alias expansion, we just pop the pushed string list (recall that diff --git a/tests/arith-for.right b/tests/arith-for.right index 5c09070b..06127be8 100644 --- a/tests/arith-for.right +++ b/tests/arith-for.right @@ -64,11 +64,11 @@ fx () 0 1 2 -bash: -c: line 0: syntax error: arithmetic expression required -bash: -c: line 0: syntax error: `(( i=0; "i < 3" ))' +bash: -c: line 1: syntax error: arithmetic expression required +bash: -c: line 1: syntax error: `(( i=0; "i < 3" ))' 2 -bash: -c: line 0: syntax error: `;' unexpected -bash: -c: line 0: syntax error: `(( i=0; i < 3; i++; 7 ))' +bash: -c: line 1: syntax error: `;' unexpected +bash: -c: line 1: syntax error: `(( i=0; i < 3; i++; 7 ))' 2 20 20 diff --git a/tests/errors.right b/tests/errors.right index 25f036e6..44dfde65 100644 --- a/tests/errors.right +++ b/tests/errors.right @@ -129,10 +129,10 @@ after 3: 1 array after 1: 0 array after 2: 0 -./errors6.sub: uvar: parameter not set -./errors6.sub: uvar: parameter null or not set +./errors6.sub: line 1: uvar: parameter not set +./errors6.sub: line 1: uvar: parameter null or not set -./errors6.sub: uvar: parameter null or not set +./errors6.sub: line 1: uvar: parameter null or not set ./errors6.sub: line 38: ${-3:-${-3}}: bad substitution ./errors6.sub: line 39: ${-3}: bad substitution ./errors6.sub: line 40: -3: invalid variable name @@ -149,10 +149,10 @@ unset array after 1: 0 array after 2: 0 -./errors6.sub: uvar: parameter not set -./errors6.sub: uvar: parameter null or not set +./errors6.sub: line 1: uvar: parameter not set +./errors6.sub: line 1: uvar: parameter null or not set -./errors6.sub: uvar: parameter null or not set +./errors6.sub: line 1: uvar: parameter null or not set ./errors6.sub: line 38: ${-3:-${-3}}: bad substitution ./errors6.sub: line 39: ${-3}: bad substitution ./errors6.sub: line 40: -3: invalid variable name diff --git a/tests/new-exp.right b/tests/new-exp.right index 307a9185..7083303d 100644 --- a/tests/new-exp.right +++ b/tests/new-exp.right @@ -710,4 +710,4 @@ aaa bb argv[1] = argv[1] = -./new-exp.tests: ABXD: parameter unset +./new-exp.tests: line 1: ABXD: parameter unset diff --git a/tests/parser.right b/tests/parser.right index cecbb222..3a01004f 100644 --- a/tests/parser.right +++ b/tests/parser.right @@ -1,16 +1,16 @@ AAA -bash5: `invalid-name': not a valid identifier +bash5: line 1: `invalid-name': not a valid identifier in in in in -bash5: -c: line 0: syntax error near unexpected token `)' -bash5: -c: line 0: `case x in esac) echo done; esac' +bash5: -c: line 1: syntax error near unexpected token `)' +bash5: -c: line 1: `case x in esac) echo done; esac' in -bash5: -c: line 0: syntax error near unexpected token `do' -bash5: -c: line 0: `case in do do) echo in; esac' -bash5: -c: line 0: syntax error near unexpected token `(' -bash5: -c: line 0: `for()' +bash5: -c: line 1: syntax error near unexpected token `do' +bash5: -c: line 1: `case in do do) echo in; esac' +bash5: -c: line 1: syntax error near unexpected token `(' +bash5: -c: line 1: `for()' in done ok 1