Carbon (macOS) port asks about killing stderr buffer

Subject: Carbon (macOS) port asks about killing stderr buffer

Date: Thu, 26 Oct 2017 11:32:17 +0100



From: David Edmondson

After the changes to use `make-process', the Carbon port of emacs on
macOS (often referred to as emacs-mac or the railwaycat port) will ask
about killing the stderr buffer after any `notmuch-search':

Debugger entered--Lisp error: (quit)
  yes-or-no-p("Buffer \" *notmuch-stderr*-839121\" has a running process; kill it? ")
  kill-buffer(#<buffer  *notmuch-stderr*-839121>)
  notmuch-start-notmuch-sentinel(#<process notmuch-search> "finished\n")

A quick look at the implementation of `make-process' in the Carbon port
didn't reveal anything obvious to me. This mostly seems like a race -
whether emacs has decided that the process associated with the stderr
buffer is dead or not when we call `kill-buffer'. Is any ordering
guaranteed by the implementation?

I _think_ that have also seen the same problem when asynchronous address
harvesting is happening for completion on the default NextStep port for
macOS, but haven't been able to reliably reproduce it.

I got a girlfriend that's better than that.
notmuch mailing list