Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/shell/hush_test/hush-trap/subshell.tests

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (show annotations) (download)
Sun May 30 11:32:42 2010 UTC (13 years, 11 months ago) by niro
File size: 598 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 # Non-empty traps should be reset in subshell
2
3 # HUP is special in interactive shells
4 trap '' HUP
5 # QUIT is always special
6 trap '' QUIT
7 # SYS is not special
8 trap '' SYS
9 # WINCH is harmless
10 trap 'bad: caught WINCH' WINCH
11 # With TERM we'll check whether it is reset
12 trap 'bad: caught TERM' TERM
13
14 # using bash, because we don't have $PPID (yet)
15 (trap; bash -c 'kill -HUP $PPID'; echo Ok)
16 (trap; bash -c 'kill -QUIT $PPID'; echo Ok)
17 (trap; bash -c 'kill -SYS $PPID'; echo Ok)
18 (trap; bash -c 'kill -WINCH $PPID'; echo Ok)
19 (trap; bash -c 'kill -TERM $PPID'; echo Bad: TERM is not reset)
20 echo Done

Properties

Name Value
svn:executable *