Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C275C429E41 for ; Mon, 27 Jun 2011 21:17:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PJtbKf14y1Fv for ; Mon, 27 Jun 2011 21:17:53 -0700 (PDT) Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU [18.9.25.14]) by olra.theworths.org (Postfix) with ESMTP id 5E19B429E32 for ; Mon, 27 Jun 2011 21:17:53 -0700 (PDT) X-AuditID: 1209190e-b7c39ae000000a8c-4d-4e0955cffe22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id A8.86.02700.FC5590E4; Tue, 28 Jun 2011 00:17:19 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p5S4HqvL020189; Tue, 28 Jun 2011 00:17:52 -0400 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p5S4HpI9006685 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 28 Jun 2011 00:17:52 -0400 (EDT) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72) (envelope-from ) id 1QbPk6-0001wW-IA; Tue, 28 Jun 2011 00:17:42 -0400 Date: Tue, 28 Jun 2011 00:17:42 -0400 From: Austin Clements To: Dmitry Kurochkin Subject: Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests Message-ID: <20110628041742.GC4120@mit.edu> References: <1309132379-24089-1-git-send-email-dmitry.kurochkin@gmail.com> <1309146846-30991-1-git-send-email-dmitry.kurochkin@gmail.com> <1309146846-30991-2-git-send-email-dmitry.kurochkin@gmail.com> <87hb7byqge.fsf@gmail.com> <87d3hyzs1c.fsf@gmail.com> <20110628034937.GB4120@mit.edu> <87aad2zjuz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87aad2zjuz.fsf@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT1z0fyulncG2liMXVrf3sFtdvzmR2 YPLYOesuu8ezVbeYA5iiuGxSUnMyy1KL9O0SuDKOt+oWrGavWH1vA0sD4wPWLkZODgkBE4mV Lc/ZIGwxiQv31gPZXBxCAvsYJc42nmeGcDYwSsx6eAPKOckksXfiDyYIZwmjxLd+kDJODhYB VYm/8xazgNhsAhoS2/YvZwSxRQQMJW5dfAVWwywgLfHtdzNQMweHsICjxPXTYOW8AtoSy1bP ADtDSOAPk8STZ7YQcUGJkzOfsEC0aknc+PcSrBVkzPJ/HCBhTgF1iQlfO8CmiwqoSFzb3842 gVFoFpLuWUi6ZyF0L2BkXsUom5JbpZubmJlTnJqsW5ycmJeXWqRrrJebWaKXmlK6iREU1JyS fDsYvx5UOsQowMGoxMPLtJLDT4g1say4MvcQoyQHk5Io755gTj8hvqT8lMqMxOKM+KLSnNTi Q4wSHMxKIrxTjYByvCmJlVWpRfkwKWkOFiVx3ijv/75CAumJJanZqakFqUUwWRkODiUJ3nch QI2CRanpqRVpmTklCGkmDk6Q4TxAw1+C1PAWFyTmFmemQ+RPMSpKifM6AtOGkABIIqM0D64X lnReMYoDvSLMawxSxQNMWHDdr4AGMwEN1jHlABlckoiQkmpglDi+MvzfPxu5oz/XfxRw7XoT 8HP99kfbtoi/+iqv59sqX2sfv1bM7oLTr3Nnd+3N+cZzzWHRRLGdv5WylzxQDchkulvqqvjg RuLntWyMoVdTWz7VLX09qyk+T/LBWifmO1kd3Gxb+x+qrTqzVDg+wmzZ748Py5yLZkeveBrP s16EcyNHLUPyMiWW4oxEQy3mouJEAMCl5vMVAwAA Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2011 04:17:53 -0000 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.