mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-30 08:59:56 +02:00
commit bash-20200805 snapshot
This commit is contained in:
@@ -215,7 +215,7 @@ _rl_handle_signal (int sig)
|
||||
the duration of the cleanup functions, make sure to add it to SET and
|
||||
set block_sig = 1 (see the SIGHUP case below). */
|
||||
block_sig = 0; /* sentinel to block signals with sigprocmask */
|
||||
sigemptyset (&sig);
|
||||
sigemptyset (&set);
|
||||
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
|
||||
#endif
|
||||
|
||||
@@ -284,7 +284,7 @@ _rl_handle_signal (int sig)
|
||||
/* We don't have to bother unblocking the signal because we are not
|
||||
running in a signal handler context. */
|
||||
#if 0
|
||||
#if define (HAVE_POSIX_SIGNALS)
|
||||
#if defined (HAVE_POSIX_SIGNALS)
|
||||
/* Make sure this signal is not blocked when we resend it to the
|
||||
calling application. */
|
||||
sigemptyset (&set);
|
||||
|
||||
+4
-1
@@ -194,4 +194,7 @@ ok 4
|
||||
ok 5
|
||||
./errors8.sub: line 14: set: notanoption: invalid option name
|
||||
ok 6
|
||||
./errors.tests: line 296: `!!': not a valid identifier
|
||||
bash: line 1: return: can only `return' from a function or sourced script
|
||||
after return
|
||||
bash: line 1: return: can only `return' from a function or sourced script
|
||||
./errors.tests: line 299: `!!': not a valid identifier
|
||||
|
||||
@@ -288,6 +288,9 @@ ${THIS_SH} -o posix ./errors7.sub
|
||||
|
||||
${THIS_SH} ./errors8.sub
|
||||
|
||||
${THIS_SH} -c 'return ; echo after return' bash
|
||||
${THIS_SH} -o posix -c 'return ; echo after return' bash
|
||||
|
||||
# this must be last!
|
||||
# in posix mode, a function name must be a valid identifier
|
||||
# this can't go in posix2.tests, since it causes the shell to exit
|
||||
|
||||
@@ -150,6 +150,9 @@ argv[4] = <d>
|
||||
argv[5] = <e>
|
||||
a?b?c
|
||||
a b c
|
||||
argv[1] = <a>
|
||||
argv[2] = <b>
|
||||
argv[3] = <>
|
||||
argv[1] = <^?>
|
||||
argv[1] = <^?>
|
||||
argv[1] = <^?>
|
||||
|
||||
@@ -404,6 +404,8 @@ echo ${a//\\?/ }
|
||||
|
||||
echo ${a//\?/ }
|
||||
|
||||
${THIS_SH} -c 'var=a:b: ; IFS=" :" ; recho $var""' bash
|
||||
|
||||
${THIS_SH} ./exp1.sub
|
||||
|
||||
${THIS_SH} ./exp2.sub
|
||||
|
||||
+18
-15
@@ -32,13 +32,16 @@ i killed it
|
||||
2: ok 2
|
||||
2: ok 3
|
||||
child1 exit status 0
|
||||
[1]+ Running sleep 20 &
|
||||
./jobs7.sub: line 5: fg: no current jobs
|
||||
[1]+ Running sleep 20 &
|
||||
0
|
||||
./jobs.tests: line 38: wait: %1: no such job
|
||||
./jobs.tests: line 43: fg: no job control
|
||||
./jobs.tests: line 40: wait: %1: no such job
|
||||
./jobs.tests: line 45: fg: no job control
|
||||
wait-for-pid
|
||||
wait-errors
|
||||
./jobs.tests: line 56: wait: `1-1': not a pid or valid job spec
|
||||
./jobs.tests: line 57: wait: `-4': not a pid or valid job spec
|
||||
./jobs.tests: line 58: wait: `1-1': not a pid or valid job spec
|
||||
./jobs.tests: line 59: wait: `-4': not a pid or valid job spec
|
||||
wait-for-background-pids
|
||||
async list wait-for-background-pids
|
||||
async list wait for child
|
||||
@@ -47,7 +50,7 @@ wait-when-no-children
|
||||
posix jobs output
|
||||
[1]+ Done sleep 1
|
||||
wait-for-job
|
||||
./jobs.tests: line 82: wait: %2: no such job
|
||||
./jobs.tests: line 84: wait: %2: no such job
|
||||
127
|
||||
async list wait-for-job
|
||||
forked
|
||||
@@ -60,19 +63,19 @@ sleep 2
|
||||
fg-bg 4
|
||||
sleep 2
|
||||
fg-bg 5
|
||||
./jobs.tests: line 109: fg: %2: no such job
|
||||
./jobs.tests: line 110: bg: job 1 already in background
|
||||
./jobs.tests: line 111: fg: %2: no such job
|
||||
./jobs.tests: line 112: bg: job 1 already in background
|
||||
fg-bg 6
|
||||
./jobs.tests: line 117: fg: -s: invalid option
|
||||
./jobs.tests: line 119: fg: -s: invalid option
|
||||
fg: usage: fg [job_spec]
|
||||
./jobs.tests: line 118: bg: -s: invalid option
|
||||
./jobs.tests: line 120: bg: -s: invalid option
|
||||
bg: usage: bg [job_spec ...]
|
||||
./jobs.tests: line 123: disown: -s: invalid option
|
||||
./jobs.tests: line 125: disown: -s: invalid option
|
||||
disown: usage: disown [-h] [-ar] [jobspec ... | pid ...]
|
||||
./jobs.tests: line 127: disown: %1: no such job
|
||||
./jobs.tests: line 130: disown: %2: no such job
|
||||
./jobs.tests: line 129: disown: %1: no such job
|
||||
./jobs.tests: line 132: disown: %2: no such job
|
||||
wait-for-non-child
|
||||
./jobs.tests: line 133: wait: pid 1 is not a child of this shell
|
||||
./jobs.tests: line 135: wait: pid 1 is not a child of this shell
|
||||
127
|
||||
3 -- 1 2 3 -- 1 - 2 - 3
|
||||
[1] Running sleep 300 &
|
||||
@@ -82,8 +85,8 @@ running jobs:
|
||||
[1] Running sleep 300 &
|
||||
[2]- Running sleep 350 &
|
||||
[3]+ Running sleep 400 &
|
||||
./jobs.tests: line 150: kill: %4: no such job
|
||||
./jobs.tests: line 152: jobs: %4: no such job
|
||||
./jobs.tests: line 152: kill: %4: no such job
|
||||
./jobs.tests: line 154: jobs: %4: no such job
|
||||
current job:
|
||||
[3]+ Running sleep 400 &
|
||||
previous job:
|
||||
|
||||
@@ -31,6 +31,8 @@ ${THIS_SH} ./jobs5.sub
|
||||
# test out wait -f framework
|
||||
${THIS_SH} ./jobs6.sub
|
||||
|
||||
${THIS_SH} ./jobs7.sub
|
||||
|
||||
jobs
|
||||
echo $?
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# make sure fg in a subshell doesn't try to start a parent's job
|
||||
set -m
|
||||
sleep 20 &
|
||||
echo $(jobs)
|
||||
echo $(fg %% ; jobs)
|
||||
kill %1
|
||||
@@ -482,6 +482,7 @@ argv[1] = <a>
|
||||
argv[2] = <b>
|
||||
argv[1] = <>
|
||||
./new-exp.tests: line 565: $(($# - 2)): substring expression < 0
|
||||
./new-exp.tests: line 567: -2: substring expression < 0
|
||||
argv[1] = <bin>
|
||||
argv[2] = <bin>
|
||||
argv[3] = <ucb>
|
||||
|
||||
@@ -563,6 +563,8 @@ recho "${*:1:0}"
|
||||
# this is an error -- negative expression
|
||||
set a
|
||||
recho ${@:1:$(($# - 2))}
|
||||
set a b c d e
|
||||
recho ${@: -3:-2}
|
||||
|
||||
XPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:.:/sbin:/usr/sbin
|
||||
set $( IFS=: ; echo $XPATH )
|
||||
|
||||
Reference in New Issue
Block a user