Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs
Date: Wed, 10 Dec 2003 18:35:31 -0600 (CST)
From: Brian Ford <ford@vss.fsi.com>
X-X-Sender: ford@eos
To: cygwin@cygwin.com
cc: pgsql-hackers@postgresql.org
Subject: Re: postgres panic error
In-Reply-To: <20031210225550.GD1700@tishler.net>
Message-ID: <Pine.GSO.4.58.0312101807090.28297@eos>
References: <3FD62A6E.8090605@zixcorp.com> <007a01c3beb3$163a2a80$a5936e3f@aurigin.com>
 <20031210225550.GD1700@tishler.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Caveat: I really don't know what I'm talking about, but I'm in a rambling
mood.

On Wed, 10 Dec 2003, Jason Tishler wrote:

> On Tue, Dec 09, 2003 at 04:18:06PM -0800, Yurgis Baykshtis wrote:
> > I tried to raise the question on pg-hackers forum and cygwin forum
> > (regarding readdir() misbehavior) but could not get any help so far :(
>
> If you can produce a minimal test case that reproduces the problem, then
> one of the core Cygwin developers might be more willing to attempt to
> fix it.
>
Several WAGs:

1.) The Solaris man page for readdir says:

     If a file is removed from or added to  the  directory  after
     the  most  recent  call  to  opendir(3C)  or  rewinddir(3C),
     whether a subsequent call to readdir() returns an entry  for
     that file is unspecified.

Is this accounted for?

2.) Is this comment in syscalls.cc relevent?

/* Close all files and process any queued deletions.
   Lots of unix style applications will open a tmp file, unlink it,
   but never call close.  This function is called by _exit to
   ensure we don't leave any such files lying around.  */

3.) Likewise in delqueue.cc:

/* FIXME: this delqueue module is very flawed and should be rewritten.
        First, having an array of a fixed size for keeping track of the
        unlinked but not yet deleted files is bad.  Second, some programs
        will unlink files and then create a new one in the same location
        and this behavior is not supported in the current code.  Probably
        we should find a move/rename function that will work on open
files,
        and move delqueue files to some special location or some such
        hack... */

Doesn't rename work while files are open?  I am pretty sure I have done it
on XP and NT4.  I should/will just go check the archives.  I know this has
been beaten to death.

3.) I don't think that Cygwin's readdir accounts for the "to be deleted
queue" or FILE_FLAG_DELETE_ON_CLOSE, PTC?  What OS was this again?

HTH and wasn't all just rambling :).  Feel free to dig in yourself.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

