[PATCH 2/2] test: use emacsclient(1) for Emacs tests
Austin Clements
amdragon at MIT.EDU
Mon Jun 27 21:17:42 PDT 2011
Quoth Dmitry Kurochkin on Jun 28 at 7:59 am:
> I am sure that would work, but I do not like the complexity. How about
> getting back to standard emacsclient and running a watchdog in the
> emacs? Like:
>
> (defun orphan-watchdog (pid)
> "Periodically check that the process with id PID is still
> running, quit if it terminated."
> (if (not (process-attributes pid))
> (kill-emacs)
> (run-at-time "1 min" nil orphan-watchdog pid)))
>
> This function (or my other changes) do not work (by yet unknown reason
> :)), but you get the idea.
I would consider this more complex than a few file descriptors. ]:--8)
Though, I'm automatically distrustful of anything that relies on
polling (why poll when you can be notified instantly?).
It also has some problems. For example, PID's are easily reused, so
if another process happens to take up that PID, the emacs could still
hang around for a long time.
More information about the notmuch
mailing list