~vcs-imports/busybox/trunk

« back to all changes in this revision

Viewing changes to shell/ash_test/ash-misc/exitcode_trap6.tests

  • Committer: Denys Vlasenko
  • Author(s): Christian Franke
  • Date: 2023-11-13 10:32:35 UTC
  • Revision ID: git-v1:a63b60bdd6fa26b867c80d44074118babbae7ffd
Cygwin: regenerate defconfig

Signed-off-by: Christian Franke <christian.franke@t-online.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# "exit" in trap should not use last command's exitcode,
 
2
# but exitcode on entering the trap.
 
3
# Nested trap should not interfere with this.
 
4
$THIS_SH -c '
 
5
 trap "echo INT" int
 
6
 trap "kill -int $$;exit" term
 
7
 kill $$ &
 
8
 (sleep 1; exit 42)
 
9
'
 
10
echo 42:$?