Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

Subject: Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

Date: Tue, 28 Jun 2011 00:17:42 -0400

To: Dmitry Kurochkin

Cc: notmuch@notmuchmail.org

From: Austin Clements


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.

Thread: