Replies: 2 comments 3 replies
-
ksh 93u+m works as expected here. The 93u+ behaviour is buggy and has been fixed. When a subshell exits, the exit status ( The exception is if a subshell, or the last command it ran, was terminated by a signal. The signal is then reissued to the parent environment and you get an exit status > 256. But that is not the case in your examples, because your subshells all exit normally with the I hope this clarifies. |
Beta Was this translation helpful? Give feedback.
-
Thanks for explaining. I have made some misunderstandings and I guess I did not explain the issue correctly. The reproduction code I provided was more complex than necessary and misleading. What I should have explained is this. $ set -o pipefail
$ seq 1000000 | head > /dev/null
$ echo $?
13 The From my investigation, it appears that this behavior was changed in ksh93u+, although I am not sure if this was intentional or not. On ksh93s+ (debian 6.0) and ksh93t+ (OpenIndiana 2013.08) it works as follows: $ set -o pipefail
$ seq 1000000 | head > /dev/null
$ echo $?
269 |
Beta Was this translation helpful? Give feedback.
-
The
seq
command seems to terminate with256+signum
(unlike128+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
ksh93u+
Beta Was this translation helpful? Give feedback.
All reactions