It is usual and expected for processes to return a non-zero exit code when they
are terminated with a signal. At the end of a test, testscript kills all background
processes and then fails if any of them terminate with a non-zero exit code.
This doesn't seem right. (It's even more wrong that it panics with an error code
that should be internal-only - see issue #228).
Instead, at the end of a test, testscript should check if any background processes
have already exited with a non-zero exit code and fail then, but otherwise
it should interrupt them and ignore any non-zero exit codes from processes
killed as a result.
It is usual and expected for processes to return a non-zero exit code when they are terminated with a signal. At the end of a test, testscript kills all background processes and then fails if any of them terminate with a non-zero exit code. This doesn't seem right. (It's even more wrong that it panics with an error code that should be internal-only - see issue #228).
Instead, at the end of a test, testscript should check if any background processes have already exited with a non-zero exit code and fail then, but otherwise it should interrupt them and ignore any non-zero exit codes from processes killed as a result.