On 09/12/11 05:01, Stefano Lattarini wrote: > I'd like to know if anyone has an idea of > what's going on exactly, and how (and if) I can work around it.
I'd guess it's tail recursion elimination: if the last thing a Korn shell does is run another program, it bypasses the fork and does an exec directly. Also, I'd guess that POSIX allows this behavior. Even if POSIX doesn't allow it, it's a nice optimization, and should be encouraged rather than being thought of as a bug.