This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

shouldn't pipes and redirection have the SAME mode?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]