Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: "Andre Oliveira da Costa" To: "Cygwin" Subject: fopen() and CON Date: Fri, 10 Dec 1999 18:23:06 -0200 Message-ID: <000001bf434c$5e4be1b0$8400000a@costa.cadenet.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Hi, I'm writing a program in which I have to open (literally) thousands of files, each with its own name (there are no duplicated names). One of them, to my deepest sorrow, is named CON.html, which leads to this situation: fopen("CON.html", "w") returns a valid (not NULL) pointer, _different from stdout or stderr_. However, every output I redirect to this file (with fprintf()) is actually redirected to the terminal. It took me a _long_ time to remember that, under MS-DOS, CON is associated to the terminal. Now, things are clearer, but still some doubts remain: * should the CON device had been opened if I asked for CON.html? * is there any way to avoid this? (I mean, what I really want is to have a text file named CON.html) I'm using B20.1 with snapshot 19991122 on top of it, and gcc-2.95.2. TIA, Costa -- André Oliveira da Costa (costa AT cade DOT com DOT br) BTW: Before someone asks: each file is closed before the next is opened, so I don't run into any limit of opened files. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com