From: Thomas Schwinge <thomas@codesourcery.com>
To: <notmuch@notmuchmail.org>
Subject: notmuch vs. SIGPIPE
Date: Mon, 20 Jan 2020 12:55:28 +0100 [thread overview]
Message-ID: <87h80qgx5b.fsf@euler.schwinge.homeip.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
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, Washington (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/command/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üße
Thomas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]
next reply other threads:[~2020-01-20 12:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 11:55 Thomas Schwinge [this message]
2020-01-20 22:36 ` notmuch vs. SIGPIPE Thomas Schwinge
2020-01-21 10:47 ` Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h80qgx5b.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).