Bernd Schumacher dixit:
>Please confirm, that this is a bug and not the expected behaviour of mksh.
I still cannot confirm either way, but some preliminary research
with an extended test script:
$ cat script
fkt()
{
trap -- "echo $1 >&2" EXIT
}
fkt shell_exit
$(fkt fn_exit)
$(trap -- "echo
The bug concerned the EXIT pseudosignal. But, apparently, mksh does not
execute subshell-specific traps for real signals either:
$ mksh -c '(trap "echo int_subsh" INT; kill -s INT $BASHPID); echo end'
end
$ bash -c '(trap "echo int_subsh" INT; kill -s INT $BASHPID); echo end'
int_subsh
end
Thank You Thorsten,
I hoped, it would be obvious that this is a bug and mksh could be fixed.
It is strange, that mksh lets me define an exit trap without error,
but then ignores the trap.
But things seem not to be so easy.
I think the use case of the "subshell_exit" is obvious.
But I will