Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199905101641.LAA17693@modi.xraylith.wisc.edu> X-Authentication-Warning: modi.xraylith.wisc.edu: localhost.xraylith.wisc.edu [127.0.0.1] didn't use HELO protocol To: Ian Collins cc: "Gnu-Win32 (E-mail)" Subject: Re: Open File Problems - WIERD!!! In-reply-to: Your message of "Mon, 10 May 1999 14:24:17 +1200." Date: Mon, 10 May 1999 11:41:56 -0500 From: Mumit Khan Ian Collins writes: > Can someone please help me with this. I have reproduced the problem on three > seperate gnu-win32 installs. > All three gnu-win32 installs are running on B20.1 using gcc version > egcs-2.91.57 19980901 (egcs-1.1 release). > > The problem manifests itself after a program has opened it's 30th file. I > see shell errors appearing ("Pipe call failed"), and even i/o corruptions > after the 30th file is opened. > > Why should 30 be the magic number? It does not correlate with limits.h > (which implies 16 is the max for fopen - surely not!!!). (Incidentally, On > my HPUX machine and SCO, these limits appear to be 60, on Linux this is 256 > and AIX is 2000) > Note also that I don't get an error from fopen, and also that the when the > error manifests itself, it is actually in a child process - NOT in the > process that has all the files open! > > Try this simple program that demonstrates the problem. This program (which > is functionally useless but demonstrates the point), loops from 0 to 31 > opening a file, file0, file1, ... file31 using fopen. (Not forgetting that > stdin, stdout and stderr are already open). > After opening the file, it calls a child process which just uses a pipe > (ls|cat > /dev/null). Thanks for the concise to-the-point test case! fwiw, it behaves as expected with the development snapshots (I'm using 1999-04-27), so it may just be fixed in the next release. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com