From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#141: marked as done (Process sentinel not called in batch mode) Date: Mon, 19 May 2008 09:40:04 -0700 Message-ID: References: <873aoe5kg3.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1211215204-32641-0" X-Trace: ger.gmane.org 1211215925 17590 80.91.229.12 (19 May 2008 16:52:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 May 2008 16:52:05 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 19 18:52:43 2008 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.50) id 1Jy8bK-0006xE-7h for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 May 2008 18:52:42 +0200 Original-Received: from localhost ([127.0.0.1]:50352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jy8aa-0002uW-58 for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 May 2008 12:51:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jy8aS-0002on-V9 for bug-gnu-emacs@gnu.org; Mon, 19 May 2008 12:51:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jy8aP-0002iy-Ec for bug-gnu-emacs@gnu.org; Mon, 19 May 2008 12:51:47 -0400 Original-Received: from [199.232.76.173] (port=38959 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jy8aO-0002ii-J5 for bug-gnu-emacs@gnu.org; Mon, 19 May 2008 12:51:44 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53952) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jy8aN-0002Ur-W4 for bug-gnu-emacs@gnu.org; Mon, 19 May 2008 12:51:44 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4JGpfvq003698; Mon, 19 May 2008 09:51:41 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m4JGe4x2032738; Mon, 19 May 2008 09:40:04 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 141 X-Emacs-PR-Package: emacs X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:18051 Archived-At: This is a multi-part message in MIME format... ------------=_1211215204-32641-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 19 May 2008 12:26:36 -0400 with message-id <873aoe5kg3.fsf@stupidchicken.com> and subject line Re: bug#141: Process sentinel not called in batch mode has caused the Emacs bug report #141, regarding Process sentinel not called in batch mode to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 141: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D141 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1211215204-32641-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,FVGT_m_MULTI_ODD autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Apr 2008 17:09:17 +0000 Received: from mercure.iro.umontreal.ca (mercure.iro.umontreal.ca [132.204.24.67]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m3FH98Es027961 for ; Tue, 15 Apr 2008 10:09:10 -0700 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 07FEB2CFBB5 for ; Tue, 15 Apr 2008 13:09:08 -0400 (EDT) Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 88DD53FE1 for ; Tue, 15 Apr 2008 13:08:55 -0400 (EDT) Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 70EEBAF5C6; Tue, 15 Apr 2008 13:08:55 -0400 (EDT) Resent-Message-ID: Resent-To: submit@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-Date: Tue, 15 Apr 2008 13:08:55 -0400 X-Original-To: monnier@iro.umontreal.ca Received: from perlin.iro.umontreal.ca (perlin.iro.umontreal.ca [132.204.24.51]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id B3CDA2CFBB0 for ; Tue, 15 Apr 2008 10:50:24 -0400 (EDT) Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by perlin.iro.umontreal.ca (Postfix) with ESMTP id 18E65148218 for ; Tue, 15 Apr 2008 10:50:20 -0400 (EDT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlmUF-0008KG-Na for monnier@iro.umontreal.ca; Tue, 15 Apr 2008 10:50:19 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlmU6-0008I5-0Q for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2008 10:50:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlmU3-0008GU-75 for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2008 10:50:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlmU2-0008GP-VA for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2008 10:50:06 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JlmU2-0006lf-BR for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2008 10:50:06 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JlmTy-0001aj-7V for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2008 14:50:02 +0000 Received: from dialin-226103.rol.raiffeisen.net ([195.254.226.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Apr 2008 14:50:02 +0000 Received: from eller.helmut by dialin-226103.rol.raiffeisen.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Apr 2008 14:50:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Helmut Eller Date: Tue, 15 Apr 2008 16:48:00 +0200 Lines: 128 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dialin-226103.rol.raiffeisen.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:9+YmaoyZkExyPBc9YZsVrtPEdxI= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: Process sentinel not called in batch mode X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org Errors-To: bug-gnu-emacs-bounces+monnier=iro.umontreal.ca@gnu.org X-DIRO-MailScanner: Found to be clean, Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-1.94, requis 5, BAYES_00 -2.60, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00), n'est pas un polluriel, SpamAssassin (score=0.659, requis 5, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner-From: monnier@iro.umontreal.ca process-sentinels aren't called in batch mode. I'm not sure if this is a bug or the expected behavior, but I find this quite frustrating. To reproduce the problem do: $shell> cat test-sentinel.el (defvar sentinel-called nil) (defun start-subprocess () (let ((proc (start-process "test" nil "bash" "-c" "sleep 1 ; exit 20"))) (set-process-sentinel proc (lambda (proc msg) (message "sentinel: %S %s" proc msg) (setq sentinel-called t))) proc)) (defun print-status (proc) (message "%s status: %s exit-status: %s sentinel-called: %s" proc (process-status proc) (process-exit-status proc) sentinel-called)) (defun main () (let ((proc (start-subprocess))) (while (not sentinel-called) (print-status proc) (sit-for 1) (accept-process-output proc 1)) (print-status proc))) (main) $shell> emacs -Q -batch -l test-sentinel.el test status: run exit-status: 0 sentinel-called: nil test status: exit exit-status: 20 sentinel-called: nil test status: exit exit-status: 20 sentinel-called: nil test status: exit exit-status: 20 sentinel-called: nil test status: exit exit-status: 20 sentinel-called: nil [Exit 130 (SIGINT)] $shell> Emacs can obviously detect that the suprocess has terminated but the sentinel is never called. This used to work with Emacs 20.7 and for certain variants of the 22.0.50 series. Helmut. In GNU Emacs 23.0.60.8 (i686-pc-linux-gnu, GTK+ Version 2.8.20) of 2008-03-14 on xaital Windowing system distributor `The X.Org Foundation', version 11.0.70101000 configured using `configure '--with-jpeg=no' '--with-gif=no' '--with-tiff=no' '--with-xft' '--without-dbus' '--without-sound'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: nil Major mode: Emacs-Lisp Minor modes in effect: outline-minor-mode: t display-time-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-d C-M-x C-x C-s C-e C-x C-e C-x C-e C-x b * M e C-x b C-a C-d C-d C-d C-e C-e C-x C-s C-x C-s C-x C-e s e e l e e p 1 SPC ; SPC C-e C-x C-s SPC C-x C-s b a C-x C-s M-x r e p SPC o SPC t SPC r Recent messages: test status: exit exit-status: 20 sentinel-called: t "test status: exit exit-status: 20 sentinel-called: t" Wrote /home/helmut/elisp/test-sentinel.el (No changes need to be saved) test status: run exit-status: 0 sentinel-called: t "test status: run exit-status: 0 sentinel-called: t" sentinel: # exited abnormally with code 20 Wrote /home/helmut/elisp/test-sentinel.el [3 times] Making completion list... [3 times] ------------=_1211215204-32641-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 141-done) by emacsbugs.donarmstrong.com; 19 May 2008 16:30:38 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4JGUZnv031425 for <141-done@emacsbugs.donarmstrong.com>; Mon, 19 May 2008 09:30:36 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id AB0464E4BE; Mon, 19 May 2008 12:26:36 -0400 (EDT) From: Chong Yidong To: Stefan Monnier Cc: Eli Zaretskii , rms@gnu.org, 141-done@emacsbugs.donarmstrong.com, eller.helmut@gmail.com, emacs-devel@gnu.org Subject: Re: bug#141: Process sentinel not called in batch mode References: <87hcd1kcmz.fsf@stupidchicken.com> <873aofvvzn.fsf@stupidchicken.com> Date: Mon, 19 May 2008 12:26:36 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 19 May 2008 04:24:19 -0400") Message-ID: <873aoe5kg3.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: >>>>> But if we're in wait_reading_process_output, that means that idle or >>>>> not, we're checking for process output, so why not check for process >>>>> status changes as well? >>> >>>> Because status_notify has a side effect of triggering redisplay. >>> >>> Thanks. Now it makes a lot more sense. Please add a corresponding >>> comment on the do_display check. > >> What do you think should be the fix for the original problem? > > The one you proposed seems right, OK. I've checked it in. ------------=_1211215204-32641-0--