delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/08/09:32:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: Mon, 8 Aug 2005 15:31:56 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: findutils vs. /proc/registry
Message-ID: <20050808133156.GB14783@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <42F75183 DOT 6010804 AT byu DOT net>
Mime-Version: 1.0
In-Reply-To: <42F75183.6010804@byu.net>
User-Agent: Mutt/1.4.2i

On Aug  8 06:35, Eric Blake wrote:
> I traced this to the fact that findutils() expects open(".", O_RDONLY) to
> succeed if a directory is readable (and that is my reading of POSIX as
> well), but cygwin is failing with EISDIR.  Is there any way cygwin can be
> patched to allow open(".", O_RDONLY) to succeed?

Just so that nobody gets a wrong impression, open(".", O_RDONLY) only
fails in some deeper virtual dirs, mainly in /proc/registry, but also
in /proc/<pid>/fd.  I'll look into this one.

> And that's where where I got stuck debugging.  Since /proc/registry is
> virtual, the notion of current working directory being a virtual directory
> is lost as soon as gdb or strace is used (reverting to pwd of the last
> non-virtual directory), so under gdb,

You can revert to that behaviour by simply adding a chdir(2) call to the
application, just for debugging.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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

- Raw text -


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