'trap' compliency?
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Mon Sep 21 10:59:42 UTC 2009
http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html
,----
| The shell shall format the output, including the proper use of
| quoting, so that it is suitable for reinput to the shell as commands
| that achieve the same trapping results. For example:
|
| save_traps=$(trap)
| ...
| eval "$save_traps"
`----
ash resets all traps when running trap in a subshell, so the
save_traps variable will be empty. bash does the right thing.
Cheers,
--
Cristian
More information about the busybox
mailing list