From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 2D6916DE01A1 for ; Mon, 20 Jan 2020 04:02:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -2.502 X-Spam-Level: X-Spam-Status: No, score=-2.502 tagged_above=-999 required=5 tests=[AWL=-0.450, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8Q5fHOHQa7LG for ; Mon, 20 Jan 2020 04:02:52 -0800 (PST) X-Greylist: delayed 428 seconds by postgrey-1.36 at arlo; Mon, 20 Jan 2020 04:02:52 PST Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by arlo.cworth.org (Postfix) with ESMTPS id ADCF86DE0243 for ; Mon, 20 Jan 2020 04:02:52 -0800 (PST) IronPort-SDR: Xafv0Co0S38/1utaHQq9WNugeIQV5aHb88A5i1laqAqnRBavZE0kYJ7s/D8hz6cbToiAiNHfL2 FDL9pKnBO3TauHtHOdtQ1S2mJQ8G8ZpUCEO0ZcGsEBixuNRFIMkEus5OIeGpDwPx3b/9IicGdq d/yCWjaifj33BYXVrQeRduPK2hE8KktAgQx7DzZwSYRBMycTytEcOoac60CJsoXdPdupJ3Jls0 mCnzrdZrnzL5Qru+RN9yYY0Qf4P9xObFsU3R3La2HjaeoZ9MU2FptyrTrg+32LddNOJ4sogOmA HW4= X-IronPort-AV: E=Sophos;i="5.70,341,1574150400"; d="asc'?scan'208";a="44950705" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 20 Jan 2020 03:55:43 -0800 IronPort-SDR: aItlv/YpdrzKVw3oZgw3stwv88ELLvpqSLnouJKgkFh4GjNuL1ZjKdieED9bbeLCgAhg32Sm0F XxspyL6m0Vdg== From: Thomas Schwinge To: Subject: notmuch vs. SIGPIPE User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Mon, 20 Jan 2020 12:55:28 +0100 Message-ID: <87h80qgx5b.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 12:02:59 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! While looking a bit into the item raised in id:87muamgspy.fsf@euler.schwinge.homeip.net I noticed the following (mis?)behavior by notmuch. To set the stage: $ yes | head -n 1 y $ echo "${PIPESTATUS[@]}" 141 0 As expected, the 'yes' process exits with SIGPIPE right after the 'head' process terminated. However: $ notmuch search \* | head -n 1 & sleep 22; jobs; ps -f [1] 622009 thread:0000000000032bb2 the future [1/1] Jenna Moss; Steve Burbon, Wa= shington (hurd list spam) [1]+ Running notmuch search \* | head -n 1 & UID PID PPID C STIME TTY TIME CMD thomas 621851 4297 0 12:38 pts/38 00:00:00 /bin/bash thomas 622008 621851 99 12:48 pts/38 00:00:22 /home/thomas/comman= d/notmuch.real search \* thomas 622013 621851 0 12:48 pts/38 00:00:00 ps -f Even after its "pipe-consumer" 'head' process has terminated, the 'notmuch' process still keeps running, and running, and running... It has to be killed manually (unless it before exits because of concurrent database modification). This doesn't seem expected behavior to me? Now, I do have a patch or two (actually dozensa; reverts, WIP etc.) on top of months-old notmuch sources, so I'll later try to reproduce that with clean sources. Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEU9WEfWKGQazCmycCAKI7+41Q4XkFAl4llTAACgkQAKI7+41Q 4XlycAv/UM9QT4I+X/9X1aGRCZTjvpGTlJ9JZIrSDGeK0ikM/EXsx94WF8bDcpJ1 ahe+piS53iFjLlyN9j4rCgm/Kfcohst026C/iwpRsOxNOCAFhAdfs9Vcmsc18rU7 aFF6K9euBTewB9iGs3tP+XHM9nsUpnsiYeNM7Kco0ggbNWL9fiyMFP1b+J7WwjUi CwMhVHMLE6qLMcpVeJOrWnotDNzDs+2CeGq6evGZJfjkiKoH6U4BK0B+HnTvo9Gq y97tu8fKIJcWp/eFktSlDpI1T3k39ZZE11B2WcpA+H+BZI6Q45RoG8SY53GXmxcr hDRIrAyvmO0hjLVjPtW9EiPqkw7ViMqCv28vUIrX1v/x9TOaL/ZAj4VQQEeHgPSM VLsTjfxVWTIIS2tYDaCTPuwmt8XpuP6Xh1/Bh+5KGkKwyBUDTqFmRVO804D2aoNi GPUJg6N+bbXjza9Iw32HRUy14a7V6r5DKwbjEAdXapJQu9uzoQcZRAzGdTNTySKj VEp3NtJD =H96e -----END PGP SIGNATURE----- --=-=-=--