On Sat, Jan 10, 2009 at 10:23:49AM +0100, Ambroz Bizjak wrote:
I don't think this is true. When the shell forks to create a child, it doesn't have to give the child the same standard file descriptors - rather it creates pipes, and it passes stdin to the child by reading its own stdin than writing the data to the child's stdin pipe. This way it can filter the input (like for control sequences). So, if it has any excess input data when it creates a child, it simply writes that data to the stdin pipe first. That is how I think things are and should be done.
Not in any shells I've fixed. There is no need for the shell itself to pre-process process input/output. There are no control sequences for the shell. (^C etc are detected by the kernel line-discipline code and sent as signals to the session leader.)
David