upstream (david korn) doesn't get what i mean. putting it up here so it doesn't get lost. quoting from the FAQ: [..] ksh runs the last component of a pipeline in the current process. Some shells run it as a subshell as if you had invoked it as echo foo | (read bar). Now, when I run $ for ((i=0; i<1000; i++)); do echo | cat >/dev/null; done on darwin, I get cat: cat: cannot execute [Exec format error] cat: cat: cannot execute [Exec format error] cat: cat: cannot execute [Exec format error] cat: cat: cannot execute [Exec format error] The higher the load i put on the system (move the mouse, play music, compile something), the more errors i get (notably i don't get any errors with close-to-zero load) The errors do not occur on solaris, gnu/linux or when run via `ksh -c`. The problem is not limited to echo/cat. It's a matter of piping.
To prove that the problem is related to that behavior I quoted from the FAQ: $ for ((i=0; i<1000; i++)); do echo | (cat) >/dev/null; done does not produce any errors. Hence not-running-a-subshell after the pipe is where the problem is coming from.
?
I've just received a reply by David Korn that it's been fixed and there's going to be a release in a week or two. I never should've opened the bug with the tone (first line) and I'm a bit ashamed.