shouldn't pipes and redirection have the SAME mode?

John Refling johnr@imageworks.com
Fri Feb 9 18:56:00 GMT 2001


the following test program:

#include <sys/fcntl.h>
main(){printf("%d\n", getmode(0));}

produces the following output:

cat it | ./a
0

while

./a < it
131072

I've seen the long discussion of setmode, and I just think
that the default mode of pipes and redirection should be the
SAME.  It makes little sense for the above program to produce
different output depending on where the same input comes from!

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list