delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/09/21:57:40

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3A84ADB6.384EBE85@imageworks.com>
Date: Fri, 09 Feb 2001 18:55:50 -0800
From: John Refling <johnr AT imageworks DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; U; IRIX 6.5 IP22)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019