unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notmuch vs. SIGPIPE
@ 2020-01-20 11:55 Thomas Schwinge
  2020-01-20 22:36 ` Thomas Schwinge
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schwinge @ 2020-01-20 11:55 UTC (permalink / raw)
  To: notmuch

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-21 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 11:55 notmuch vs. SIGPIPE Thomas Schwinge
2020-01-20 22:36 ` Thomas Schwinge
2020-01-21 10:47   ` Thomas Schwinge

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).