delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/27/20:54:17

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 27 Oct 2001 20:52:20 -0400 (EDT)
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
X-X-Sender: cwilson AT medulla DOT ibb DOT gatech DOT edu
To: Goksun Ilhan <goksun_ilhan AT yahoo DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Perl database problem
In-Reply-To: <20011026225958.19008.qmail@web10804.mail.yahoo.com>
Message-ID: <Pine.GSO.4.40.0110272048050.27218-100000@medulla.ibb.gatech.edu>
MIME-Version: 1.0
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)

On Fri, 26 Oct 2001, Goksun Ilhan wrote:
> I am trying to run a Perl program in cygwin. When I
> create the database using dbmopen command, it looks
> like it's working (it's only creating .pag file, not
> .dir file). However, when I try to read something from
> the database, it cannot open the file. I run the
> program on a UNIX machine and it works. Is there way
> to run that program using cygwin?

cygwin's perl uses gdbm to provide back end database services (including
NDBM:: GDBM:: and ODBM::).  The dbmopen() command that you reference
indicates that you are using the NDBM:: flavor.  When gdbm is used in its
ndbm-emulation mode, it stores the data in the .pag file -- but creates a
.dir file as a HARD LINK so that the on-disk footprint of this
gdbm-masquerading-as-ndbm is the same as REAL ndbm databases.

However, hard links don't work on FAT drives, only NTFS drives.  (No, we
can't change gdbm to use symlinks instead -- the hard link is necessary
because REAL ndbm expects both files to have the same timestamp.  With
hardlinks, they will.  with symlinks, they won;t).

Solution?  Don't use ndbm.  (NDBM::)  Use gdbm.

Or, make sure your databases are created on an NTFS drive.

--Chuck



--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019