From unknown Wed Jun 18 00:26:00 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6079 <6079@debbugs.gnu.org> To: bug#6079 <6079@debbugs.gnu.org> Subject: Status: 24.0.50; set-process-sentinel doesn't work inside sentinels Reply-To: bug#6079 <6079@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:26:00 +0000 retitle 6079 24.0.50; set-process-sentinel doesn't work inside sentinels reassign 6079 emacs submitter 6079 Helmut Eller severity 6079 normal tag 6079 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 08:08:07 2010 Received: (at submit) by debbugs.gnu.org; 2 May 2010 12:08:07 +0000 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 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 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_NON_FQDN_1, HELO_NO_DOMAIN, RCVD_IN_BRBL_LASTEXT, RCVD_IN_RP_RNBL, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.0 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 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 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 From: Helmut Eller To: bug-gnu-emacs@gnu.org Subject: 24.0.50; set-process-sentinel doesn't work inside sentinels Date: Sun, 02 May 2010 14:07:52 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 21 19:58:31 2019 Received: (at 6079) by debbugs.gnu.org; 21 Aug 2019 23:58:31 +0000 Received: from localhost ([127.0.0.1]:36838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0aUp-0001U3-1N for submit@debbugs.gnu.org; Wed, 21 Aug 2019 19:58:31 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0aUn-0001Tu-F7 for 6079@debbugs.gnu.org; Wed, 21 Aug 2019 19:58:29 -0400 Received: from 77.18.59.87.tmi.telenormobil.no ([77.18.59.87] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0aUj-0007mp-Bk; Thu, 22 Aug 2019 01:58:28 +0200 From: Lars Ingebrigtsen To: Helmut Eller Subject: Re: bug#6079: 24.0.50; set-process-sentinel doesn't work inside sentinels References: Date: Wed, 21 Aug 2019 16:58:21 -0700 In-Reply-To: (Helmut Eller's message of "Sun, 02 May 2010 14:07:52 +0200") Message-ID: <87r25et6jm.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Helmut Eller writes: > 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")) > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6079 Cc: 6079@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Helmut Eller writes: > 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. (I'm going through old bug reports that have unfortunately gotten no attention yet.) I tried reproducing this bug in Emacs 27, but I get: waiting for b b: stopped (signal) waiting for a a: killed The exec_sentinel_unwind function no longer exists in Emacs, so the code in this area has changed in the nine years since you reported this bug. Do you still see this bug in more modern Emacs versions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 21 19:59:03 2019 Received: (at control) by debbugs.gnu.org; 21 Aug 2019 23:59:03 +0000 Received: from localhost ([127.0.0.1]:36842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0aVL-0001VY-C4 for submit@debbugs.gnu.org; Wed, 21 Aug 2019 19:59:03 -0400 Received: from quimby.gnus.org ([80.91.231.51]:45588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0aVJ-0001V7-C8 for control@debbugs.gnu.org; Wed, 21 Aug 2019 19:59:02 -0400 Received: from 77.18.59.87.tmi.telenormobil.no ([77.18.59.87] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0aVG-0007mx-8B for control@debbugs.gnu.org; Thu, 22 Aug 2019 01:59:00 +0200 Date: Wed, 21 Aug 2019 16:58:50 -0700 Message-Id: <87pnkyt6it.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6079 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 6079 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 6079 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 01:58:12 2019 Received: (at 6079) by debbugs.gnu.org; 14 Oct 2019 05:58:12 +0000 Received: from localhost ([127.0.0.1]:37604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJtMy-0004Xl-8W for submit@debbugs.gnu.org; Mon, 14 Oct 2019 01:58:12 -0400 Received: from [80.91.231.51] (port=49688 helo=quimby.gnus.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJtMu-0004Xa-GI for 6079@debbugs.gnu.org; Mon, 14 Oct 2019 01:58:10 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJtMp-0002F6-AZ; Mon, 14 Oct 2019 07:58:07 +0200 From: Lars Ingebrigtsen To: Helmut Eller Subject: Re: bug#6079: 24.0.50; set-process-sentinel doesn't work inside sentinels References: <87r25et6jm.fsf@mouse.gnus.org> Date: Mon, 14 Oct 2019 07:58:02 +0200 In-Reply-To: <87r25et6jm.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 21 Aug 2019 16:58:21 -0700") Message-ID: <87sgnvq36d.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > The exec_sentinel_unwind function no longer exists in Emacs, so the code > in this area has changed in the nine years since you reported this bug. > > Do you still see this bug in more modern Emacs [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Lars Ingebrigtsen writes: > The exec_sentinel_unwind function no longer exists in Emacs, so the code > in this area has changed in the nine years since you reported this bug. > > Do you still see this bug in more modern Emacs [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ingebrigtsen.no] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 6079 Cc: 6079@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Lars Ingebrigtsen writes: > The exec_sentinel_unwind function no longer exists in Emacs, so the code > in this area has changed in the nine years since you reported this bug. > > Do you still see this bug in more modern Emacs versions? More information was requested some weeks back, but no response was given, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 01:58:17 2019 Received: (at control) by debbugs.gnu.org; 14 Oct 2019 05:58:17 +0000 Received: from localhost ([127.0.0.1]:37607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJtN3-0004Y4-GP for submit@debbugs.gnu.org; Mon, 14 Oct 2019 01:58:17 -0400 Received: from [80.91.231.51] (port=49706 helo=quimby.gnus.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJtN1-0004Xv-Rm for control@debbugs.gnu.org; Mon, 14 Oct 2019 01:58:16 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJtMy-0002FQ-UM for control@debbugs.gnu.org; Mon, 14 Oct 2019 07:58:14 +0200 Date: Mon, 14 Oct 2019 07:58:11 +0200 Message-Id: <87r23fq364.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6079 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 6079 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 6079 quit Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) close 6079 quit From unknown Wed Jun 18 00:26:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Nov 2019 12:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator