Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Message-ID: <38D3A4C2.10F7A269@attglobal.net> Date: Sat, 18 Mar 2000 10:46:10 -0500 From: John Fortin X-Sender: "John Fortin" <@smtp-gw01.ny.us.ibm.net> (Unverified) X-Mailer: Mozilla 4.7 [en]C-gatewaynet (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: File permision errors on win98 with net release candidate References: <20000317155549 DOT 19900 DOT qmail AT web122 DOT yahoomail DOT com> <20000317110225 DOT A15494 AT cygnus DOT com> <38D2DAF7 DOT 9977A3C1 AT attglobal DOT net> <20000318013542 DOT A6684 AT cygnus DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Chris Faylor wrote: > > On Fri, Mar 17, 2000 at 08:25:11PM -0500, John Fortin wrote: > >> Can someone take a look at the configure code that is failing, pare it down > >> to a simple test case and either report it here or, even better, run strace > >> on a failing shell and send it here? > > > >OK, here goes... > > > >I trimmed the failing configure script to this which still fails with > >this output: > > > >~/gnu/autoconf-2.13/: config.jef > >config.jef > >.//config.jef: cannot create temp file for here document: Permission > >denied > >~/gnu/autoconf-2.13/: bash -version > >bash -version > >GNU bash, version 2.03.0(2)-release (i686-pc-cygwin) > >Copyright 1998 Free Software Foundation, Inc. > >~/gnu/autoconf-2.13/: > > I've checked in a change that seems to fix this. There is danger here, > however. I messed around with the unlink() function. > > The problem was that bash was using a UNIX-idiom. It was opening a file, > deleting it, and then reading from it. Windows doesn't allow you to > delete an open file so cygwin works around this by maintaining a queue > of files to delete when it finds that it has hit a sharing violation > like this. > > Windows 95, in certain circumstances, does not return a sharing > violation when an attempt is made to delete an open file. Instead, it > returns an access error. This makes the error indistinguishable from > other access errors. > > So, I rewrote unlink() to open the file with a "CLOSE_ON_DELETE" flag > in cases where it couldn't delete the file immediately. > > On NT, that will actually do exactly what we want. On 95, it may fail > but if the file is already open *then* I'll get a sharing error. So, > we can detect that and queue the file for later deletion -- the old > fashioned way. > > Anyway, please, everybody test this and let me know if I've broken > anything. > > Thanks, John, for the test case, and strace output that allowed me to > pinpoint the problem. > > cgf I compiled from CVS, and all seems OK so far. John