From unknown Sat Jun 14 03:57:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 09 Jul 2014 23:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17981 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: bug-gnulib@gnu.org Cc: agx@sigxcpu.org, 17981@debbugs.gnu.org, bug-sed@gnu.org X-Debbugs-Original-Cc: agx@sigxcpu.org, bug-grep@gnu.org, bug-sed@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14049495712690 (code B ref -1); Wed, 09 Jul 2014 23:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jul 2014 23:46:11 +0000 Received: from localhost ([127.0.0.1]:51426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X51Yw-0000hK-1A for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:46:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49605) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X51Yq-0000gT-E2 for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:46:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X51Yf-0004HF-Me for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:45:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID, WEIRD_PORT autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X51Yf-0004HB-HA for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:45:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4bI4-0001MN-24 for bug-grep@gnu.org; Tue, 08 Jul 2014 15:43:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4bHx-0003rQ-4u for bug-grep@gnu.org; Tue, 08 Jul 2014 15:42:59 -0400 Received: from qmta06.emeryville.ca.mail.comcast.net ([76.96.30.56]:42014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4bHw-0003r1-Sv for bug-grep@gnu.org; Tue, 08 Jul 2014 15:42:53 -0400 Received: from omta13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by qmta06.emeryville.ca.mail.comcast.net with comcast id PvKk1o00317UAYkA6virsl; Tue, 08 Jul 2014 19:42:51 +0000 Received: from red.redhat.com ([24.10.254.122]) by omta13.emeryville.ca.mail.comcast.net with comcast id Pvik1o00A2fD5rL8ZviqBe; Tue, 08 Jul 2014 19:42:50 +0000 From: Eric Blake Date: Tue, 8 Jul 2014 13:42:43 -0600 Message-Id: <1404848563-29767-1-git-send-email-eblake@redhat.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <53BC0256.1010203@redhat.com> References: <53BC0256.1010203@redhat.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1404848571; bh=U+IlAwxrWBRH/7bw2QoMtJ+rKXXKW5V02WqEhbQUJkY=; h=Received:Received:From:To:Subject:Date:Message-Id; b=RcDHRvdprkt444MWbQ/TN1NGVwNuzqZLZCcTuT01elAPbJoBfpEdozL1KkRksGzlP LKGmbNfdnpYnpYk08Dl1SyxvUS5o7B2SfoR7t0EpszSORA8iLrkyEiqdfFT41VWRWF BQs7Zl0SX/3Cgl37GYjNWmLW8RKuKfUHLbHYSbqX970Bxl1W+jYd0WNNbsP1PBMUmF VoWLJfyo2mIUY2VUnj1pUzKEyqvw603lKsvz32YruNh4temkddSZy8r9ki/6UmPCgW pje+hVo5ybPMngtBwB/msuvl232cFAkzOcWjFmWhT5NfWJHRe+IBWQzxjle6C+HFPo bzXJu0tUXzYjg== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) For a project with enough files, such as libvirt, vc-list-files can produce so much input that it can lead to SIGPIPE to earlier parts of a pipeline when later parts do a quick filter. Also, many buildbot environments (annoyingly) ignore SIGPIPE, which causes a number of tools to be rather chatty about reporting EPIPE write failures. It doesn't help that POSIX has standardized that the shell is unable to revert SIGPIPE to unignored status if it inherits it as ignored - otherwise, the solution would just be to re-enable SIGPIPE anywhere we expect to benefit from early filtering exits. Here's a short demonstration: $ ( trap '' PIPE; build-aux/vc-list-files | grep -l '\.c$' >/dev/null) sed: couldn't write 16 items to stdout: Broken pipe and a link to the much larger buildbot results against libvirt which provoked this patch: http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2465/ But look at the above example: we are piping data to grep -l, and then discarding that output. At most, data | grep -l will output "(standard input)", and exit early if the first match is found before the end of a page (causing SIGPIPE to the process feeding the pipe). It makes much more sense to use grep -l when searching for a subset of files that have a match among a larger set of file names passed as arguments, and NOT when used to filter stdin. Sure, we're burning a bit more CPU power by processing the full list instead of exiting early, but at least it cuts down on the noise. * top/maint.mk (_sc_header_without_use) (sc_require_config_h_first): Parse full list. Signed-off-by: Eric Blake --- I'll push this to gnulib to work around the issue. But it really begs the question - can sed and grep be taught a way to silently ignore EPIPE errors? See also http://austingroupbugs.net/view.php?id=789, which is considering standardizing the shell's 'set -o pipefail', and where it becomes vital to be able to exit with 0 status when used on the left side of a pipe if the only reason we are exiting early is because the right side of the pipe is also exiting early without consuming everything we are shoving into the pipe. It is unclear at this point whether POSIX would recommend that filter applications should _always_ exit with 0 status on pipe failure, or only do this for EPIPE write failures when SIGPIPE is ignored, or whether it should be optional behavior that must be explicitly enabled via a command-line option and/or system-wide environment variable. But the point remains that among all possible write failures, the failure to write to a pipe is often expected as part of an optimized pipeline in order to reduce CPU usage, and there should be a way to handle it silently. ChangeLog | 6 ++++++ top/maint.mk | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e793866..a93f468 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-07-08 Eric Blake + + maint.mk: less syntax-check noise when SIGPIPE is ignored + * top/maint.mk (_sc_header_without_use) + (sc_require_config_h_first): Parse full list. + 2014-06-27 Paul Eggert mktime: merge #if/#ifdef usage from glibc diff --git a/top/maint.mk b/top/maint.mk index 3f369b7..0cc769c 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -440,7 +440,7 @@ sc_require_config_h: # You must include before including any other header file. # This can possibly be via a package-specific header, if given by cfg.mk. sc_require_config_h_first: - @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ + @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ fail=0; \ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ grep '^# *include\>' $$i | $(SED) 1q \ @@ -464,7 +464,7 @@ sc_prohibit_HAVE_MBRTOWC: define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ - if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ + if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ grep -LE "$$re" $$files | grep . && \ -- 1.9.3 From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 11 16:41:00 2014 Received: (at control) by debbugs.gnu.org; 11 Jul 2014 20:41:00 +0000 Received: from localhost ([127.0.0.1]:53762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5hcp-0006Xq-TI for submit@debbugs.gnu.org; Fri, 11 Jul 2014 16:41:00 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:41336) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5hcm-0006XZ-LC for control@debbugs.gnu.org; Fri, 11 Jul 2014 16:40:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 0F5F1A60006 for ; Fri, 11 Jul 2014 13:40:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uxyDbF15i7k6 for ; Fri, 11 Jul 2014 13:40:42 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6FB4039E8013 for ; Fri, 11 Jul 2014 13:40:42 -0700 (PDT) Message-ID: <53C04BCA.1050201@cs.ucla.edu> Date: Fri, 11 Jul 2014 13:40:42 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: grep bug maintenance Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) close 17868 severity 17981 wishlist From unknown Sat Jun 14 03:57:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 11 Jul 2014 20:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17981 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Eric Blake , bug-gnulib@gnu.org Cc: agx@sigxcpu.org, 17981@debbugs.gnu.org, bug-sed@gnu.org Received: via spool by 17981-submit@debbugs.gnu.org id=B17981.140511232831788 (code B ref 17981); Fri, 11 Jul 2014 20:59:01 +0000 Received: (at 17981) by debbugs.gnu.org; 11 Jul 2014 20:58:48 +0000 Received: from localhost ([127.0.0.1]:53773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5hty-0008GV-K6 for submit@debbugs.gnu.org; Fri, 11 Jul 2014 16:58:47 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:42120) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5htv-0008GA-ID for 17981@debbugs.gnu.org; Fri, 11 Jul 2014 16:58:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C2B6039E801C; Fri, 11 Jul 2014 13:58:33 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fBN9NFgIgw6v; Fri, 11 Jul 2014 13:58:25 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2509A39E8013; Fri, 11 Jul 2014 13:58:25 -0700 (PDT) Message-ID: <53C04FF0.20607@cs.ucla.edu> Date: Fri, 11 Jul 2014 13:58:24 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 References: <53BC0256.1010203@redhat.com> <1404848563-29767-1-git-send-email-eblake@redhat.com> In-Reply-To: <1404848563-29767-1-git-send-email-eblake@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) On 07/08/2014 12:42 PM, Eric Blake wrote: > It is unclear > at this point whether POSIX would recommend that filter > applications should_always_ exit with 0 status on pipe failure, > or only do this for EPIPE write failures when SIGPIPE is ignored, > or whether it should be optional behavior that must be explicitly > enabled via a command-line option and/or system-wide environment > variable. None of these options sound appealing, I'm afraid. The first two would be an incompatible change to longstanding standard behavior. A system-wide environment variable would be problematic for all the usual reaosns. A command-line option would be a pain to use (what? I have to modify all my shell scripts?). Instead, how about this idea? Change the behavior of the shell so that SIGPIPE is not ignored in a pipeline (except in the pipeline's last member of course), even if it is ignored in the parent. This is also a change to POSIX, but it's a relatively minor one. Or, if we want to be conservative about it, we could make the new behavior depend on a new shell option. Either way, this would solve the problem without having to change grep, sed, etc. We might also want to have a way to reenable traps in the shell when they're disabled; that's been a longstanding problem even aside from this SIGPIPE business. From unknown Sat Jun 14 03:57:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 11 Jul 2014 21:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17981 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Paul Eggert , bug-gnulib@gnu.org Cc: agx@sigxcpu.org, 17981@debbugs.gnu.org, bug-sed@gnu.org Received: via spool by 17981-submit@debbugs.gnu.org id=B17981.1405113037856 (code B ref 17981); Fri, 11 Jul 2014 21:11:01 +0000 Received: (at 17981) by debbugs.gnu.org; 11 Jul 2014 21:10:37 +0000 Received: from localhost ([127.0.0.1]:53778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5i5T-0000Dj-Ra for submit@debbugs.gnu.org; Fri, 11 Jul 2014 17:10:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17570) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5i5P-0000DV-13 for 17981@debbugs.gnu.org; Fri, 11 Jul 2014 17:10:33 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6BLAM76018619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Jul 2014 17:10:22 -0400 Received: from [10.3.113.16] ([10.3.113.16]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6BLALD6011641; Fri, 11 Jul 2014 17:10:21 -0400 Message-ID: <53C052BD.3050703@redhat.com> Date: Fri, 11 Jul 2014 15:10:21 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 References: <53BC0256.1010203@redhat.com> <1404848563-29767-1-git-send-email-eblake@redhat.com> <53C04FF0.20607@cs.ucla.edu> In-Reply-To: <53C04FF0.20607@cs.ucla.edu> X-Enigmail-Version: 1.6 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bswTmpIInokKGLRj9Glw6BkaBA9pdg1J3" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Spam-Score: -5.7 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.7 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bswTmpIInokKGLRj9Glw6BkaBA9pdg1J3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/11/2014 02:58 PM, Paul Eggert wrote: > On 07/08/2014 12:42 PM, Eric Blake wrote: >> It is unclear >> at this point whether POSIX would recommend that filter >> applications should_always_ exit with 0 status on pipe failure, >> or only do this for EPIPE write failures when SIGPIPE is ignored, >> or whether it should be optional behavior that must be explicitly >> enabled via a command-line option and/or system-wide environment >> variable. >=20 > None of these options sound appealing, I'm afraid. The first two woul= d > be an incompatible change to longstanding standard behavior. A > system-wide environment variable would be problematic for all the usual= > reaosns. A command-line option would be a pain to use (what? I have to= > modify all my shell scripts?). Not all your scripts, only those scripts where you plan to use 'set -o pipefail'. >=20 > Instead, how about this idea? Change the behavior of the shell so that= > SIGPIPE is not ignored in a pipeline (except in the pipeline's last > member of course), even if it is ignored in the parent. This is also a= > change to POSIX, but it's a relatively minor one. Or, if we want to be= > conservative about it, we could make the new behavior depend on a new > shell option. Either way, this would solve the problem without having > to change grep, sed, etc. That's not quite right. Remember, the choice is between: sigpipe normal: foo | bar if foo dies from SIGPIPE, but 'set -o pipefail' is in effect, then the whole pipeline fails with status 141 (SIGPIPE killed a member of the pipeline). vs. sigpipe ignored: foo | bar foo will NOT get SIGPIPE, but instead gets EPIPE. If it treats the write error as fatal, and exits non-zero, then 'set -o pipefail' fails the whole pipeline. But if it treats the write error as the request to do an early non-fatal exit with status 0, then the whole pipeline can also have status 0. The idea is that if you are going to write code with 'set -o pipefail', you would do it like: set -o pipefail (trap '' PIPE; foo) | bar set +o pipefail where you explicitly ignore SIGPIPE (and force EPIPE write errors) on any element of the pipeline where you expect the right side of the pipe may exit early. >=20 > We might also want to have a way to reenable traps in the shell when > they're disabled; that's been a longstanding problem even aside from > this SIGPIPE business. Yes, that would be nice to have. But it goes in the opposite direction of 'set -o pipefail', because re-enabling default SIGPIPE behavior causes processes to die with status 141. Or are you arguing that any shell that provides 'set -o pipefail' should ALSO provide a knob to explicitly treat death due to SIGPIPE as not impacting pipefail? At which point, then you DO want to re-enable rather than ignore SIGPIPE, and don't have to worry about what child processes do on EPIPE, but only what they do on SIGPIPE, where death by SIGPIPE is not fatal to the pipeline. Probably worth adding some of these thoughts to the Austin Group bug proposal. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bswTmpIInokKGLRj9Glw6BkaBA9pdg1J3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTwFK9AAoJEKeha0olJ0NqqHYH+wdEMG7kIXpqE9B/qF97AATZ uil/QIAonPT5vmCji/ypB33oU5TrhZt756CB2mQ8HYU9Su1j8IiDuKbnYxo7thtf Wz84AhVk4sOxW76vKkdF/wwJeKSAMdsU3WYtpVfW4VnDIhG2V2x5R7VvnLbQoP7L ElJBlvxMFwuBqv/NEtnG1PsIjxkYj2ogF5J+jSchOYsG1WxZXtRbjA9ZANGRsi1R sfWt2Ne91AeuZLeKphtE1H52KIma/5yCKAwsCNGTTpWealupf2m3+HVBL8cHQST1 s8915eJxyol5m62gYX20EbMN0QQbXahu6Yzunr/BF83Pk6zRoE8IN87E+kNtVKs= =SRoI -----END PGP SIGNATURE----- --bswTmpIInokKGLRj9Glw6BkaBA9pdg1J3-- From unknown Sat Jun 14 03:57:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 11 Jul 2014 21:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17981 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Eric Blake , bug-gnulib@gnu.org Cc: agx@sigxcpu.org, 17981@debbugs.gnu.org, bug-sed@gnu.org Received: via spool by 17981-submit@debbugs.gnu.org id=B17981.14051131691152 (code B ref 17981); Fri, 11 Jul 2014 21:13:01 +0000 Received: (at 17981) by debbugs.gnu.org; 11 Jul 2014 21:12:49 +0000 Received: from localhost ([127.0.0.1]:53782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5i7c-0000IV-Cn for submit@debbugs.gnu.org; Fri, 11 Jul 2014 17:12:49 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:42986) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5i7a-0000IF-5c for 17981@debbugs.gnu.org; Fri, 11 Jul 2014 17:12:46 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8614639E801C; Fri, 11 Jul 2014 14:12:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0rVu4iJjT2U9; Fri, 11 Jul 2014 14:12:32 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id E442139E8013; Fri, 11 Jul 2014 14:12:31 -0700 (PDT) Message-ID: <53C0533F.1030009@cs.ucla.edu> Date: Fri, 11 Jul 2014 14:12:31 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 References: <53BC0256.1010203@redhat.com> <1404848563-29767-1-git-send-email-eblake@redhat.com> <53C04FF0.20607@cs.ucla.edu> <53C052BD.3050703@redhat.com> In-Reply-To: <53C052BD.3050703@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) On 07/11/2014 02:10 PM, Eric Blake wrote: > are you arguing that any shell that provides 'set -o pipefail' should > ALSO provide a knob to explicitly treat death due to SIGPIPE as not > impacting pipefail? At which point, then you DO want to re-enable > rather than ignore SIGPIPE, and don't have to worry about what child > processes do on EPIPE, but only what they do on SIGPIPE, where death by > SIGPIPE is not fatal to the pipeline. Yes, that's the basic idea. Sorry I did not explain it clearly enough. Please feel free to forward this on to the Austin group. From unknown Sat Jun 14 03:57:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Tue, 01 Sep 2020 02:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17981 X-GNU-PR-Package: grep X-GNU-PR-Keywords: patch To: Eric Blake , bug-gnulib@gnu.org Cc: agx@sigxcpu.org, 17981-done@debbugs.gnu.org, bug-sed@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159892777820702 (code B ref -1); Tue, 01 Sep 2020 02:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Sep 2020 02:36:18 +0000 Received: from localhost ([127.0.0.1]:54325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCw9i-0005Np-Am for submit@debbugs.gnu.org; Mon, 31 Aug 2020 22:36:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:51634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCw9g-0005Nb-EQ for submit@debbugs.gnu.org; Mon, 31 Aug 2020 22:36:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCw9g-00021X-3e; Mon, 31 Aug 2020 22:36:16 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCw9d-000511-Q8; Mon, 31 Aug 2020 22:36:15 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4F694160065; Mon, 31 Aug 2020 19:36:11 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QfgNCZi5sqNr; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5491D160084; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H_kwmIk73HqG; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1F23E160065; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) From: Paul Eggert References: <53BC0256.1010203@redhat.com> <1404848563-29767-1-git-send-email-eblake@redhat.com> <53C04FF0.20607@cs.ucla.edu> <53C052BD.3050703@redhat.com> <53C0533F.1030009@cs.ucla.edu> Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzR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UpjdWVrWCtlQ1BEQ0tyWU1YUjBGWWd3 cEcySVRaVUd0ckVqRVNsRTZEc2N4NzM0SEtkcjVPUklvY0wKVVVLRU9HZWlVNkRHaEdGZGI1 VHd1MFNuK3UxbVVQRE4wTSsrQ2RNdkNsSUU4a2xvNEc5MUVPSW11MVVwYjh4YwpPUFF3eGgx andxU3JVNVF3b05tU1llZ1FTSExwSVV1ckZ6MWlRVWgxdnBQWHpLaW5rV0VxdjRJcUExY2lM K0x5CnlTdUxrcDdNc0pwVlJNYldKQ05XT09TYmFING9EQko1ZEhNR2MzNXg1bW9zQ2s5MFBY a251RkREc1lIZkRvNXMKbWY5bG82WVh4N045Cj0zTGFJCi0tLS0tRU5EIFBHUCBQVUJMSUMg S0VZIEJMT0NLLS0tLS0K Organization: UCLA Computer Science Department Message-ID: Date: Mon, 31 Aug 2020 19:36:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <53C0533F.1030009@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/31 22:36:11 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -62 X-Spam_score: -6.3 X-Spam_bar: ------ X-Spam_report: (-6.3 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.13, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) On 7/11/14 2:12 PM, Paul Eggert wrote: > Yes, that's the basic idea.=C2=A0 Sorry I did not explain it clearly en= ough. Please=20 > feel free to forward this on to the Austin group. Later Austin group commentary=20 suggested that = this=20 issue is no reason to change how 'grep' behaves, so I'm closing the grep = bug report. From unknown Sat Jun 14 03:57:41 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eric Blake Subject: bug#17981: closed (Re: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored) Message-ID: References: <1404848563-29767-1-git-send-email-eblake@redhat.com> X-Gnu-PR-Message: they-closed 17981 X-Gnu-PR-Package: grep X-Gnu-PR-Keywords: patch Reply-To: 17981@debbugs.gnu.org Date: Tue, 01 Sep 2020 02:37:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1598927822-20771-1" This is a multi-part message in MIME format... ------------=_1598927822-20771-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 17981@debbugs.gnu.org. --=20 17981: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17981 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1598927822-20771-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17981-done) by debbugs.gnu.org; 1 Sep 2020 02:36:19 +0000 Received: from localhost ([127.0.0.1]:54327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCw9i-0005Nr-Kn for submit@debbugs.gnu.org; Mon, 31 Aug 2020 22:36:18 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCw9g-0005NV-Nt for 17981-done@debbugs.gnu.org; Mon, 31 Aug 2020 22:36:17 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4F694160065; Mon, 31 Aug 2020 19:36:11 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QfgNCZi5sqNr; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5491D160084; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H_kwmIk73HqG; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1F23E160065; Mon, 31 Aug 2020 19:36:10 -0700 (PDT) Subject: Re: bug#17981: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored From: Paul Eggert To: Eric Blake , bug-gnulib@gnu.org References: <53BC0256.1010203@redhat.com> <1404848563-29767-1-git-send-email-eblake@redhat.com> <53C04FF0.20607@cs.ucla.edu> <53C052BD.3050703@redhat.com> <53C0533F.1030009@cs.ucla.edu> Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc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6dDUKVDFhWU85aHNLaGg3dkR0Sys2UHJvWkdjKzA4Z1VU WEhoYjk3aE1NUWhrbkpsbmZqcFNFQzllbTkwNkZVK0k5MwpUMWZUR3VwbkJhM2FXY0s4ak0w SmFCR2J5MmhHMVMzb2xhRExTVHRCSU5OQlltdnVXUjlNS09oaHFEcmxrNWN3CkZESkxoNU5y WHRlRVkwOFdBemNMekczcGtyWFBIa0ZlTVF0ZnFrMGpMZEdHdkdDM05DSWtxWXJkTGhpUnZH cHIKdTM4QzI2UkVuNWY0STB2R0UzVmZJWEhlOFRNQ05tUXV0MU50TXVVbXBESXkxYUx4R3p1 cHRVaG5PSk4vL3IrVgpqRFBvaTNMT3lTTllwaHFlL2RNdWJzZlVyNm9oUDQxbUtGODFGdXdJ NGFtcUp0cnFJTDJ5cWF4M2EwcWxmd0N4ClhmdGllcUpjdWVrWCtlQ1BEQ0tyWU1YUjBGWWd3 cEcySVRaVUd0ckVqRVNsRTZEc2N4NzM0SEtkcjVPUklvY0wKVVVLRU9HZWlVNkRHaEdGZGI1 VHd1MFNuK3UxbVVQRE4wTSsrQ2RNdkNsSUU4a2xvNEc5MUVPSW11MVVwYjh4YwpPUFF3eGgx andxU3JVNVF3b05tU1llZ1FTSExwSVV1ckZ6MWlRVWgxdnBQWHpLaW5rV0VxdjRJcUExY2lM K0x5CnlTdUxrcDdNc0pwVlJNYldKQ05XT09TYmFING9EQko1ZEhNR2MzNXg1bW9zQ2s5MFBY a251RkREc1lIZkRvNXMKbWY5bG82WVh4N045Cj0zTGFJCi0tLS0tRU5EIFBHUCBQVUJMSUMg S0VZIEJMT0NLLS0tLS0K Organization: UCLA Computer Science Department Message-ID: Date: Mon, 31 Aug 2020 19:36:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <53C0533F.1030009@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: 17981-done Cc: agx@sigxcpu.org, 17981-done@debbugs.gnu.org, bug-sed@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) On 7/11/14 2:12 PM, Paul Eggert wrote: > Yes, that's the basic idea.=C2=A0 Sorry I did not explain it clearly en= ough. Please=20 > feel free to forward this on to the Austin group. Later Austin group commentary=20 suggested that = this=20 issue is no reason to change how 'grep' behaves, so I'm closing the grep = bug report. ------------=_1598927822-20771-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Jul 2014 23:46:11 +0000 Received: from localhost ([127.0.0.1]:51426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X51Yw-0000hK-1A for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:46:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49605) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X51Yq-0000gT-E2 for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:46:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X51Yf-0004HF-Me for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:45:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID, WEIRD_PORT autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X51Yf-0004HB-HA for submit@debbugs.gnu.org; Wed, 09 Jul 2014 19:45:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4bI4-0001MN-24 for bug-grep@gnu.org; Tue, 08 Jul 2014 15:43:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4bHx-0003rQ-4u for bug-grep@gnu.org; Tue, 08 Jul 2014 15:42:59 -0400 Received: from qmta06.emeryville.ca.mail.comcast.net ([76.96.30.56]:42014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4bHw-0003r1-Sv for bug-grep@gnu.org; Tue, 08 Jul 2014 15:42:53 -0400 Received: from omta13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by qmta06.emeryville.ca.mail.comcast.net with comcast id PvKk1o00317UAYkA6virsl; Tue, 08 Jul 2014 19:42:51 +0000 Received: from red.redhat.com ([24.10.254.122]) by omta13.emeryville.ca.mail.comcast.net with comcast id Pvik1o00A2fD5rL8ZviqBe; Tue, 08 Jul 2014 19:42:50 +0000 From: Eric Blake To: bug-gnulib@gnu.org Subject: [PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored Date: Tue, 8 Jul 2014 13:42:43 -0600 Message-Id: <1404848563-29767-1-git-send-email-eblake@redhat.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <53BC0256.1010203@redhat.com> References: <53BC0256.1010203@redhat.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1404848571; bh=U+IlAwxrWBRH/7bw2QoMtJ+rKXXKW5V02WqEhbQUJkY=; h=Received:Received:From:To:Subject:Date:Message-Id; b=RcDHRvdprkt444MWbQ/TN1NGVwNuzqZLZCcTuT01elAPbJoBfpEdozL1KkRksGzlP LKGmbNfdnpYnpYk08Dl1SyxvUS5o7B2SfoR7t0EpszSORA8iLrkyEiqdfFT41VWRWF BQs7Zl0SX/3Cgl37GYjNWmLW8RKuKfUHLbHYSbqX970Bxl1W+jYd0WNNbsP1PBMUmF VoWLJfyo2mIUY2VUnj1pUzKEyqvw603lKsvz32YruNh4temkddSZy8r9ki/6UmPCgW pje+hVo5ybPMngtBwB/msuvl232cFAkzOcWjFmWhT5NfWJHRe+IBWQzxjle6C+HFPo bzXJu0tUXzYjg== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: agx@sigxcpu.org, bug-grep@gnu.org, bug-sed@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) For a project with enough files, such as libvirt, vc-list-files can produce so much input that it can lead to SIGPIPE to earlier parts of a pipeline when later parts do a quick filter. Also, many buildbot environments (annoyingly) ignore SIGPIPE, which causes a number of tools to be rather chatty about reporting EPIPE write failures. It doesn't help that POSIX has standardized that the shell is unable to revert SIGPIPE to unignored status if it inherits it as ignored - otherwise, the solution would just be to re-enable SIGPIPE anywhere we expect to benefit from early filtering exits. Here's a short demonstration: $ ( trap '' PIPE; build-aux/vc-list-files | grep -l '\.c$' >/dev/null) sed: couldn't write 16 items to stdout: Broken pipe and a link to the much larger buildbot results against libvirt which provoked this patch: http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2465/ But look at the above example: we are piping data to grep -l, and then discarding that output. At most, data | grep -l will output "(standard input)", and exit early if the first match is found before the end of a page (causing SIGPIPE to the process feeding the pipe). It makes much more sense to use grep -l when searching for a subset of files that have a match among a larger set of file names passed as arguments, and NOT when used to filter stdin. Sure, we're burning a bit more CPU power by processing the full list instead of exiting early, but at least it cuts down on the noise. * top/maint.mk (_sc_header_without_use) (sc_require_config_h_first): Parse full list. Signed-off-by: Eric Blake --- I'll push this to gnulib to work around the issue. But it really begs the question - can sed and grep be taught a way to silently ignore EPIPE errors? See also http://austingroupbugs.net/view.php?id=789, which is considering standardizing the shell's 'set -o pipefail', and where it becomes vital to be able to exit with 0 status when used on the left side of a pipe if the only reason we are exiting early is because the right side of the pipe is also exiting early without consuming everything we are shoving into the pipe. It is unclear at this point whether POSIX would recommend that filter applications should _always_ exit with 0 status on pipe failure, or only do this for EPIPE write failures when SIGPIPE is ignored, or whether it should be optional behavior that must be explicitly enabled via a command-line option and/or system-wide environment variable. But the point remains that among all possible write failures, the failure to write to a pipe is often expected as part of an optimized pipeline in order to reduce CPU usage, and there should be a way to handle it silently. ChangeLog | 6 ++++++ top/maint.mk | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e793866..a93f468 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-07-08 Eric Blake + + maint.mk: less syntax-check noise when SIGPIPE is ignored + * top/maint.mk (_sc_header_without_use) + (sc_require_config_h_first): Parse full list. + 2014-06-27 Paul Eggert mktime: merge #if/#ifdef usage from glibc diff --git a/top/maint.mk b/top/maint.mk index 3f369b7..0cc769c 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -440,7 +440,7 @@ sc_require_config_h: # You must include before including any other header file. # This can possibly be via a package-specific header, if given by cfg.mk. sc_require_config_h_first: - @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ + @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ fail=0; \ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ grep '^# *include\>' $$i | $(SED) 1q \ @@ -464,7 +464,7 @@ sc_prohibit_HAVE_MBRTOWC: define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ - if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ + if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ grep -LE "$$re" $$files | grep . && \ -- 1.9.3 ------------=_1598927822-20771-1--