Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 22 May 2002 18:02:34 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Bug: fhandler.cc rev=1.116 source code level bug in fhandler_base::dup (fhandler_base *child) Message-ID: <20020522220234.GA24565@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20020522165921 DOT GB3592 AT redhat DOT com> <200205222127 DOT OAA23136 AT kankakee DOT wrs DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205222127.OAA23136@kankakee.wrs.com> User-Agent: Mutt/1.3.23.1i On Wed, May 22, 2002 at 02:27:16PM -0700, mike stump wrote: >> 1) What's "gmake"? > >GNU make. Yeah, I sort of figured that. Is this the make that comes with the distribution or something you've built yourself? >> 2) Why shouldn't it "set an error" if handle 0 is closed? No answer here... >> 3) Why would anyone do a dup(dup(-1))? > >Because they can. dup(-1) is defined to return -1, and otherwise not >do anything and set errno to EBADF. I'm aware that you should be able to use a -1 but I can't imagine writing a program which does anything useful with that. However, it looks like there is a logic error in dup() where if it is passed a -1, it will not reliably set an EBADF errno. The fix does not look like what you proposed, hoever. >> 4) Why would setting nh to anything affect this code? This code path is >> only invoked for /cygdrive or /proc style paths. No answer here? >> If you have a specific problem, you should provide a test case. I don't >> see any problems with recursive invocation of gmake jobs with stdio. > >compare: > > ( exec <&-; make foo; ) > >with > > ( exec <&-; make foo >Makefile: > >foo: > echo me > ls && echo me > >This needs to work. When it works, one will see an ls, when it fails, >one will get a core file. On a real unix system (solaris for >example), it works just fine When does one see a core file? Is this an intermittent failure? I don't see a core file from this behavior. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/