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 ash: add testcase for bug 5304 2008-10-27 14:33:03 +00:00
reap1.tests ash: add testcase for bug 5304 2008-10-27 14:33:03 +00:00
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 ash: better handling of EXIT trap in `trap` hack 2009-09-25 00:06:51 +02:00
sigint1.right ash: fix ash-signals/signal8 testcase failure 2011-02-21 03:22:20 +01:00
sigint1.tests slightly better wording in comments 2011-02-21 03:47:50 +01:00
signal1.right ash,hush: make trap output short signal names, without SIG prefix 2009-09-27 02:05:45 +02:00
signal1.tests ash testsuite: remove two inadvertent bashisms 2016-10-01 17:30:21 +02:00
signal2.right ash: add slightly different testcase 2008-07-26 14:20:04 +00:00
signal2.tests ash: add slightly different testcase 2008-07-26 14:20:04 +00:00
signal3.right ash: add slightly different testcase 2008-07-26 14:20:04 +00:00
signal3.tests ash: add slightly different testcase 2008-07-26 14:20:04 +00:00
signal4.right ash: trap with bad signal name should not abort 2010-03-26 15:52:24 +01:00
signal4.tests ash: trap with bad signal name should not abort 2010-03-26 15:52:24 +01:00
signal5.right ash: fix redirection of fd 0 in scripts are sourced from interactive ash 2010-06-03 04:28:28 +02:00
signal5.tests ash: fix redirection of fd 0 in scripts are sourced from interactive ash 2010-06-03 04:28:28 +02:00
signal6.right add two more tests which currently fail 2010-05-17 04:57:55 +02:00
signal6.tests ash: fix bug which causes signal6.tests to fail 2010-05-18 15:49:07 +02:00
signal7.right ash: fix $! value when traps are set 2010-07-25 13:07:39 +02:00
signal7.tests ash: fix $! value when traps are set 2010-07-25 13:07:39 +02:00
signal8.right ash: fix signal and "set -e" interaction 2010-09-25 17:15:13 +02:00
signal8.tests ash: fix signal and "set -e" interaction 2010-09-25 17:15:13 +02:00
signal9.right ash: fix signal and "set -e" interaction 2010-09-25 17:15:13 +02:00
signal9.tests ash: fix signal and "set -e" interaction 2010-09-25 17:15:13 +02:00
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