Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 X-X-Sender: cwilson AT medulla DOT ibb DOT gatech DOT edu To: Goksun Ilhan cc: cygwin AT cygwin DOT com Subject: Re: Perl database problem In-Reply-To: <20011026225958.19008.qmail@web10804.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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/