busybox/shell/ash_test/ash-signals
Ron Yorston 098cd7ece4 ash: improve trap and jobs builtins in child shells
The trap and jobs builtins can be used to report information about
traps and jobs.  This works when they're called from the current
shell but in a child shell the required information is usually
cleared.  Special hacks allow:

- trap to work with command substitution;
- jobs to work with command substitution or in a pipeline.

Neither works with process substitution.

- Relax the test for the trap hack so it also supports pipelines.

- Pass the command to be evaluated to forkshell() in evalbackcmd()
  so trap and jobs both work with process substitution.

function                                             old     new   delta
forkchild                                            629     640     +11
argstr                                              1502    1496      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-6)               Total: 5 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-03-31 14:22:56 +02:00
..
catch.right ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
catch.tests ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
continue_and_trap1.right ash,hush: add a test that "continue" does not cripple traps 2016-10-01 23:28:02 +02:00
continue_and_trap1.tests ash,hush: add a test that "continue" does not cripple traps 2016-10-01 23:28:02 +02:00
reap1.right
reap1.tests
return_in_trap1.right ash testsuite: add return_in_trap1.tests 2016-10-01 22:36:14 +02:00
return_in_trap1.tests typo fixes 2016-10-26 13:15:35 +02:00
save-ret.right ash testsuite: add most of hust tests which pass for ash 2016-10-03 00:06:55 +02:00
save-ret.tests ash testsuite: add most of hust tests which pass for ash 2016-10-03 00:06:55 +02:00
savetrap.right ash,hush: make trap output short signal names, without SIG prefix 2009-09-27 02:05:45 +02:00
savetrap.tests
sigint1.right
sigint1.tests slightly better wording in comments 2011-02-21 03:47:50 +01:00
signal1.right
signal1.tests ash testsuite: remove two inadvertent bashisms 2016-10-01 17:30:21 +02:00
signal2.right
signal2.tests
signal3.right
signal3.tests
signal4.right
signal4.tests
signal5.right
signal5.tests
signal6.right
signal6.tests ash: fix bug which causes signal6.tests to fail 2010-05-18 15:49:07 +02:00
signal7.right
signal7.tests
signal8.right ash: fix signal and "set -e" interaction 2010-09-25 17:15:13 +02:00
signal8.tests
signal9.right
signal9.tests
signal_read2.right ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
signal_read2.tests ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
sigquit_exec.right ash: do not leave SIGQUIT ignored on "exec CMD" 2016-07-16 18:33:55 +02:00
sigquit_exec.tests ash: do not leave SIGQUIT ignored on "exec CMD" 2016-07-16 18:33:55 +02:00
subshell.right ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
subshell.tests ash: copy three tests from hush_test/hush-signals/* 2017-07-24 19:42:46 +02:00
usage.right ash: improve trap and jobs builtins in child shells 2023-03-31 14:22:56 +02:00
usage.tests ash: improve trap and jobs builtins in child shells 2023-03-31 14:22:56 +02:00