Hi Pádraig,
Pádraig Brady <[email protected]> writes:
> * tests/env/env-signal-handler.sh: Add a test for this
> oft interfered with signal.
> ---
> tests/env/env-signal-handler.sh | 34 +++++++++++++++++++++++----------
> 1 file changed, 24 insertions(+), 10 deletions(-)
Cool, thanks.
It might be worth adding a test in misc/ that checks that programs that
execute other programs don't reset ignored signals.
For example, the correct behavior here is for 'yes' to inhert the
SIG_IGN handler for SIGPIPE:
$ env --ignore-signal=PIPE timeout 1 yes | :
yes: standard output: Broken pipe
$ echo ${PIPESTATUS[0]}
1
If 'timeout' reset the signal handler to SIG_DFL, ${PIPESTATUS[0]} would
be 141. And that would be a bug.
I'll think about it.
Collin
P.S. I recently found out zsh uses the lowercase 'pipestatus'. I wonder
why they chose to be different there.