From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#6079: 24.0.50; set-process-sentinel doesn't work inside sentinels Date: Sun, 02 May 2010 14:07:52 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272803178 7144 80.91.229.12 (2 May 2010 12:26:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 May 2010 12:26:18 +0000 (UTC) To: 6079@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 02 14:26:08 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O8YFL-00023O-JD for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 May 2010 14:26:07 +0200 Original-Received: from localhost ([127.0.0.1]:56478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8YFL-0004zc-14 for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 May 2010 08:26:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8YFE-0004zB-7T for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:26:00 -0400 Original-Received: from [140.186.70.92] (port=43519 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8YFB-0004yr-Mu for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:25:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8YFA-0001ps-Qa for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:25:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43134) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8YFA-0001pk-NW for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:25:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O8Xyn-0008Mh-NY; Sun, 02 May 2010 08:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Helmut Eller Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 May 2010 12:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6079 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.127280208732145 (code B ref -1); Sun, 02 May 2010 12:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 May 2010 12:08:07 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8Xxu-0008MQ-TF for submit@debbugs.gnu.org; Sun, 02 May 2010 08:08:07 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8Xxt-0008M2-H3 for submit@debbugs.gnu.org; Sun, 02 May 2010 08:08:06 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:36324) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O8Xxo-0005ir-6j for submit@debbugs.gnu.org; Sun, 02 May 2010 08:08:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8Xxn-0001sZ-PL for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:07:59 -0400 Original-Received: from [140.186.70.92] (port=46651 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8Xxl-0001sQ-8J for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:07:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8Xxk-0008Cx-6v for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:07:56 -0400 Original-Received: from dial-178183.pool.broadband44.net ([212.46.178.183]:54469 helo=ix) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8Xxk-0008Cp-08 for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 08:07:56 -0400 Original-Received: from helmut by ix with local (Exim 4.69) (envelope-from ) id 1O8Xxg-0000ww-Kw for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 14:07:52 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 02 May 2010 08:09:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36642 Archived-At: set-process-sentinel can't be used inside sentinels because exec_sentinel_unwind always restores the old value. This code (let* ((proc (start-process "foo" nil "/bin/bash" "-c" "sleep 100")) (a-called nil) (sentinel-a (lambda (proc msg) (message "a: %s" msg) (setq a-called t))) (b-called nil) (sentinel-b (lambda (proc msg) (message "b: %s" msg) (set-process-sentinel proc sentinel-a) (setq b-called t)))) (set-process-sentinel proc sentinel-b) (signal-process proc 'SIGSTOP) (message "waiting for b") (while (not b-called) (accept-process-output proc)) (signal-process proc 'SIGKILL) (message "waiting for a") (while (not a-called) (accept-process-output proc))) prints: waiting for b b: stopped (signal) waiting for a b: killed which means that sentinel-b was called twice. Since sentinel-b sets the the process sentinel to sentinel-a I would expect that sentinel-b can only be called once.