NetBSD Problem Report #56584
From gson@gson.org Mon Dec 27 14:23:54 2021
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id DAC451A9239
for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Dec 2021 14:23:53 +0000 (UTC)
Message-Id: <20211227142339.A8167254252@guava.gson.org>
Date: Mon, 27 Dec 2021 16:23:39 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: "grep -D skip" fails to skip FIFOs
X-Send-Pr-Version: 3.95
>Number: 56584
>Category: bin
>Synopsis: "grep -D skip" fails to skip fifos
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 27 14:25:00 +0000 2021
>Closed-Date: Fri Apr 19 02:35:48 +0000 2024
>Last-Modified: Fri Apr 19 02:35:48 +0000 2024
>Originator: Andreas Gustafsson
>Release: NetBSD 9.2; also -current
>Organization:
>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:
The grep(1) man page states:
-D ACTION, --devices=ACTION
If an input file is a device, FIFO or socket, use ACTION to
process it. By default, ACTION is read, which means that
devices are read just as if they were ordinary files. If ACTION
is skip, devices are silently skipped.
but when "grep -D skip" encounters a FIFO, it is read rather than skipped.
>How-To-Repeat:
# mkfifo fifo
# grep -D skip fifo
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Tue, 28 Dec 2021 09:37:55 +0000
State-Changed-Why:
The fix for this is obvious, but I am not sure of the protocols
for modifying imported code so I have punted this to Christos
to either fix or tell me to do it the obvious way...
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56584 CVS commit: src/external/gpl2/grep/dist/src
Date: Tue, 28 Dec 2021 09:59:03 -0500
Module Name: src
Committed By: christos
Date: Tue Dec 28 14:59:02 UTC 2021
Modified Files:
src/external/gpl2/grep/dist/src: grep.c
Log Message:
PR/56584: Andreas Gustafsson: Skip FIFO's when -D
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/grep/dist/src/grep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->needs-pullups
State-Changed-By: gson@NetBSD.org
State-Changed-When: Wed, 29 Dec 2021 09:34:35 +0000
State-Changed-Why:
Confirmed fixed, seems like a candidate for pulling up.
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/56584 ("grep -D skip" fails to skip fifos)
Date: Wed, 29 Dec 2021 19:16:42 +0700
This should probably be fixed properly before pullups,
it still opens devices with -D skip, with the side effects
that can have with (some) device types.
The alternative woukd be to switch to MKBSDGREP=yes
unless someone knows why that would not yet be suitable.
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 04 Apr 2024 21:11:46 +0000
State-Changed-Why:
pullup-8 #1957
pullup-9 #1832
not needed in 10
issue with opening devices can be another PR
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56584 CVS commit: [netbsd-9] src/external/gpl2/grep/dist/src
Date: Thu, 18 Apr 2024 16:05:24 +0000
Module Name: src
Committed By: martin
Date: Thu Apr 18 16:05:24 UTC 2024
Modified Files:
src/external/gpl2/grep/dist/src [netbsd-9]: grep.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1832):
external/gpl2/grep/dist/src/grep.c: revision 1.3
PR/56584: Andreas Gustafsson: Skip FIFO's when -D
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.18.1 src/external/gpl2/grep/dist/src/grep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56584 CVS commit: [netbsd-8] src/external/gpl2/grep/dist/src
Date: Thu, 18 Apr 2024 16:06:25 +0000
Module Name: src
Committed By: martin
Date: Thu Apr 18 16:06:25 UTC 2024
Modified Files:
src/external/gpl2/grep/dist/src [netbsd-8]: grep.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1957):
external/gpl2/grep/dist/src/grep.c: revision 1.3
PR/56584: Andreas Gustafsson: Skip FIFO's when -D
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 src/external/gpl2/grep/dist/src/grep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 19 Apr 2024 02:35:48 +0000
State-Changed-Why:
fixed and pulled up
gating open on stat for -D skip can be a separate PR
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.