This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
shouldn't pipes and redirection have the SAME mode?
- To: cygwin at cygwin dot com
- Subject: shouldn't pipes and redirection have the SAME mode?
- From: John Refling <johnr at imageworks dot com>
- Date: Fri, 09 Feb 2001 18:55:50 -0800
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