From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 19 00:16:02 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87B79573; Sat, 19 Jan 2013 00:16:02 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) by mx1.freebsd.org (Postfix) with ESMTP id 643A5F44; Sat, 19 Jan 2013 00:16:02 +0000 (UTC) Received: from epsilon.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 4EA131ECC8; Fri, 18 Jan 2013 16:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1358554555; bh=B0QfL/5KgTS/gBdStHsaUwjmXvaqYeqlqhes2IzzPC4=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=KOYgwet74QYlPNlod+JiEoN1pDkbc5KfZQ88vMHc3eTCZedNExJeaoVyPU5Z9lBb1 X8XQyzcAwNAvYOlKZZ6Ws+Tqzvk2KUTJT30gr6IRSw4DhrwTo3SYL05ioA1gVtfoCv Q/PpNd305609huBeyEOYe26PbdbXYbnxbL6qrgnc= Message-ID: <50F9E5B9.1050402@delphij.net> Date: Fri, 18 Jan 2013 16:15:53 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: John Baldwin Subject: Re: Fixing grep -D skip References: <50F8B491.8090303@freebsd.org> <201301181139.00910.jhb@freebsd.org> In-Reply-To: <201301181139.00910.jhb@freebsd.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, David Xu X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2013 00:16:02 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/18/13 08:39, John Baldwin wrote: > On Thursday, January 17, 2013 9:33:53 pm David Xu wrote: >> I am trying to fix a bug in GNU grep, the bug is if you want to >> skip FIFO file, it will not work, for example: >> >> grep -D skip aaa . >> >> it will be stucked on a FIFO file. >> >> Here is the patch: >> http://people.freebsd.org/~davidxu/patch/grep.c.diff2 >> >> Is it fine to be committed ? > > I think the first part definitely looks fine. My guess is the > non-blocking change is als probably fine, but that should be run > by the bsdgrep person at least. I (disclaimer: not bsdgrep person) have just tested that bsdgrep handle this case just fine. The non-blocking part is required to make the code function, otherwise the system will block on open() if fifo don't have another opener. I'd say "Yes" for this p Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die a -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJQ+eW5AAoJEG80Jeu8UPuzaPkH/RPnvBg5pDPxmbSXWF3T22s3 XTPNfDns416g6dqig+E+YOhamu+Pz8xFC6JCu3DzPbNcb+OGRh14LBFeZQ6xn648 yxn1j0Y2ZsmjoppMAWg+wuwLtOYX0pK69zZzOxQMepBeA/rkA26hJA/3j6VTPu/X hLFP+bRy+wt8Ni39PuSrBywuPmwg82de+Fuf8WVVVwXgXHnK+yc/Pb1JWgiU6kzz r1tyCAh2rXcM4mg++LUoeYZZhrLuxWKKPrXkzGSbz7NSPXJccwf5rx/ZPB2EysVv Z/CA6wS2jqsOUbyelM01jtvrY6Q6llLIIEc3aGPcjYZbqy/B0VLwyGnR+rElKBo= =M7oI -----END PGP SIGNATURE-----