public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* shouldn't pipes and redirection have the SAME mode?
@ 2001-02-09 18:56 John Refling
  2001-02-09 19:16 ` DJ Delorie
  0 siblings, 1 reply; 2+ messages in thread
From: John Refling @ 2001-02-09 18:56 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-09 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-09 18:56 shouldn't pipes and redirection have the SAME mode? John Refling
2001-02-09 19:16 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).