The seq command seems to terminate with 256+signum (unlike 128+signum in other shells) as expected, but the shell does not seem to get the values right. Perhaps it has something to do with the exit status value obtained from the subshell, but I don't know what is right.
ksh93u+m/1.1.0-alpha+8f84f4b2
$ ksh -c 'set -o pipefail; (seq 1000000; xs=$?; echo $xs >&2; exit $xs) | head > /dev/null; echo $?'
269
13
$ ksh -c '(exit 255); echo $?; (exit 256); echo $?; (exit 257); echo $?'
255
0
1
$ ksh -c 'set -o pipefail; (exit 255)|:; echo $?; (exit 256)|:; echo $?; (exit 257)|:; echo $?'
255
0
1
ksh93u+
$ ksh -c 'set -o pipefail; (seq 1000000; xs=$?; echo $xs >&2; exit $xs) | head > /dev/null; echo $?'
269
141
$ ksh -c '(exit 255); echo $?; (exit 256); echo $?; (exit 257); echo $?'
255
0
257
$ ksh -c 'set -o pipefail; (exit 255)|:; echo $?; (exit 256)|:; echo $?; (exit 257)|:; echo $?'
255
0
129
The
seqcommand seems to terminate with256+signum(unlike128+signumin other shells) as expected, but the shell does not seem to get the values right. Perhaps it has something to do with the exit status value obtained from the subshell, but I don't know what is right.ksh93u+m/1.1.0-alpha+8f84f4b2
ksh93u+