On 6/18/10 10:05 AM, Dr. Werner Fink wrote: > as now is visible the last command in the pipe sequence done > in the bash is a real sub process whereas in the ksh it is not. > > The question rises: Why does the bash require a sub peocess/shell > for the final command of a pipe sequence.
It's an implementation decision: the code as it exists today is more straightforward. Since Posix requires that all commands in a pipeline be executed in a subshell environment, though it allows the ksh behavior as an extension, there's been no requirement to change it. If anyone would like to take a shot at changing the code to not fork when executing a command with a pipe for stdin, I'd be glad to take a look at the result. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/