delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/09/07/16:52:08

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8369C3948A51
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1599511891;
bh=dhba1OtJ+8rDdqDVGfJndwugSi/y1uZMivk0giDwtaY=;
h=Date:From:To:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
Reply-To:From;
b=aCJcv3DyabS4vNpTceOcO5o9zvP3XHYBRjFHGjflheoW1WmQCcZSAS+DV8WP0MVZz
V6bAXoOVC+U0opDlt8CGI2GGsib5BM2YoNBvHUCS55ePU+PDGReoZVWu7kCYnjbw6f
OffcwPZE3ifLFORRKOxLODF0CRonpFZFcdLuomi8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 799673861035
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cygwin.com
Authentication-Results: sourceware.org;
spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com
Date: Mon, 7 Sep 2020 22:51:26 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Weird behavior in 'grep'ing for string in /proc/registry...
Message-ID: <20200907205126.GK4127@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5F55C670 DOT 7030004 AT tlinx DOT org>
<758d674d-7501-56ea-7246-894e5c877778 AT SystematicSw DOT ab DOT ca>
<ddc33d3b-3caf-447e-fbd1-e53192eb55bc AT towo DOT net>
MIME-Version: 1.0
In-Reply-To: <ddc33d3b-3caf-447e-fbd1-e53192eb55bc@towo.net>
X-Provags-ID: V03:K1:wFIhgiZ4A0KyZd1yxOnyARM1RqxGbnBWC343hH0HiRH5y8kZO9E
bPWu4TN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nsFaxwqsGoBIn10ARGrTSJSZa0bu4HFCmi7vi/CEj+xU1
7u6SCE46rkfM8hQSNd3w==
X-Spam-Status: No, score=-100.6 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 087KpupV006662

On Sep  7 09:53, Thomas Wolff wrote:
> Am 07.09.2020 um 09:05 schrieb Brian Inglis:
> > On 2020-09-06 23:34, L A Walsh wrote:
> > > In directory
> > > /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/eventlog
> > > I wanted to list all the ".dll"s that handled various types of
> > > events.
> > > 
> > > I tried
> > > /bin/grep -Pr '\.dll'
> > > 
> > > but got a load of bogus error messages:
> > > 
> > > /bin/grep: Group: Is a directory
> > > /bin/grep: ImagePath: Is a directory
> > > /bin/grep: Description: Is a directory
> > > /bin/grep: ObjectName: Is a directory
> > > ....
> > [...]
> I reproduced Lindas observation (although not in the folder she mentioned
> which does not exist here) and in fact there is an inconsistency between
> `grep -r` reporting "Is a directory" for entries that are not marked as
> directory by `ls`:
> .pwd
> /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Appinfo/Parameters
> .ls -l
> insgesamt 0
> -r--r----- 1 SYSTEM SYSTEM 34 27. Nov 2019  ServiceDll
> -r--r----- 1 SYSTEM SYSTEM  4 27. Nov 2019  ServiceDllUnloadOnStop
> .grep -r .
> grep: ServiceDll: Is a directory
> grep: ServiceDllUnloadOnStop: Is a directory
> 
> I checked whether `opendir` marks the d_type fields wrong in the /proc
> filesystem but that's not it.

No, it's a collision of an internal flag with an official open(2) flag
from fcntl.h, used by grep in this case.  I changed the way the internal
flag is used so it doesn't collide with fcntl.h flags ever, even if we
add some more.

I uploaded new snapshots for testing to https://cygwin.com/snapshots/

Please give them a try.


Thanks,
Corinna


-- 
Corinna Vinschen
Cygwin Maintainer
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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