mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 15:43:18 +02:00
15 lines
510 B
Plaintext
15 lines
510 B
Plaintext
# When the shell is waiting, by means of the wait utility, for asynchronous
|
|
# commands to complete, the reception of a signal for which a trap has been
|
|
# set shall cause the wait utility to return immediately with an exit status
|
|
# >128, immediately after which the trap associated with that signal shall be
|
|
# taken.
|
|
|
|
trap 'echo got $(kill -l $BASH_TRAPSIG)' USR1
|
|
|
|
sleep 10 &
|
|
( sleep 2 ; kill -USR1 $$ ) &
|
|
|
|
# should be interrupted by the signal
|
|
wait
|
|
[[ $? -gt 128 ]] || echo 'wait status not greater than 128'
|