pipe/redirect dumb question

jim.mcginness at att.net jim.mcginness at att.net
Wed Dec 11 19:00:30 EST 2002


> Is there a difference between piping something into another
> utility and using the "<" redirection operator to send data
> to it?

An ordinary redirection opens a file descriptor with regular file semantics.
Some shells implement "process" redirection which is similar to a pipe.

The main difference between pipe file descriptors and "file" file descriptors
is that pipes implement a sort of flow control. Draining a pipe causes the
reader to block rather than receive an EOF. Filling up the pipe will cause
the writer to block.

Other differences are the way the file descriptors respond to various other
syscalls. For instance, you can't do a 'seek' on a pipe.



More information about the gnhlug-discuss mailing list