From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix Dietrich Newsgroups: gmane.emacs.help Subject: Re: unwind-protect and inhibit-quit Date: Sat, 17 Jul 2021 13:52:40 +0200 Message-ID: <87lf65nomv.fsf@sperrhaken.name> References: <875yxbr4lr.fsf@sperrhaken.name> <83eeby680s.fsf@gnu.org> <8735seosjs.fsf@sperrhaken.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32999"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 17 13:53:37 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m4isy-0008Sl-OB for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 17 Jul 2021 13:53:36 +0200 Original-Received: from localhost ([::1]:50388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4isx-0007Jp-Db for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 17 Jul 2021 07:53:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4isE-0007Av-GK for help-gnu-emacs@gnu.org; Sat, 17 Jul 2021 07:52:50 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:45843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4isB-0000xd-Uc for help-gnu-emacs@gnu.org; Sat, 17 Jul 2021 07:52:50 -0400 Original-Received: from localhost ([77.11.79.224]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MXXZf-1lcwMM3YT9-00Ywpg for ; Sat, 17 Jul 2021 13:52:45 +0200 In-Reply-To: (Stefan Monnier via Users list for the's message of "Fri, 16 Jul 2021 17:37:51 -0400") X-Provags-ID: V03:K1:AcPQhV5Syn190ipvqUdsGB5Doj54FrNqheUFnzsOZltt6lGH+aP VBGFUGtuT60Lp0IVihRlgXDxVWWfeZVYHSqnqTzbC9tYrmCrBF7x133FcEpZWRYJcnmlwa/ Nbm3N1B7+CECOHza/DhQqWuOELA8LeIMB14jB9uDaIcEkebF6ib9VL8rBSojYl4gAdwy7H8 XfyPNi1dk13QxsHkaBZUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:MtEYF+6cr5I=:+ca7GfoUJH94whsZnORfZJ olGaFS1EZnZfthD/XXNlYD/lXV2VwIJYa/Wz51cLszSAOgdi8KPogX9iEBSY7C4/S764UrRIf 0CYw9aNfivnChCytqeeYr0aCQDZMnrEeeEy7rWA0btefUUegl8PRkYKWmMm+81vK1jWMwpsl0 A6j75IPaL0uZk13ThwBnUI6M/f5lt1hkTRIzy7JP7n/qVpjTZXJX5/dc3H3EbuRTDscZsK+mV aJqQ9xqCmNnERBnFQQWudMdjOaevHm4mfIFDgEOS01ADnE8JfvC6Wok120azu47nPRiCc0rCb 0jXI10jI79St4rrmgt/1bwsoMYEaY4S139ZTVRjmbu21ABCKqiN7j1zkKvLbYnoN71Hp/A7MP tciRqc7zhOHJQ6tdXXVyVUxSv92kmEJWL8eYVnhvThfcK0ZrttkytHzHv+jbECBurp6AZQUV6 ecV0Nl0pYaP8XCTgdHOLR2MxWtIBkCCpSJd731HK4zNy5AqvAZsOFFKq24myXzf5h3i5o9vbl OnVP250opiRuTDEYgbqCZdaICBw/s6suu2orJj8fZglr4rSF/4ZlHg5OVa3DbFG4SvB4x0ZMi Tn0n/JdHGJxrFKu07XmMvCwj0rYuWsma0VRyVpwG571vbPQ5risGI0gOlyN0WgtHVE7yUEgJ8 h4zkJM5K8jxqN2GrOfRGaxznz844X7n1+4u6Ct+i8dxoPPkHXqT7V/eSzmGHFwHb53GDBZW6T CehjtJQLv9i5UGnGgtSdMvcs6udA0zbSGhSOkW9OBbyxVu8WtV8+yWScEnzeZzTGj8Qx4izJ Received-SPF: none client-ip=212.227.126.130; envelope-from=felix.dietrich@sperrhaken.name; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131790 Archived-At: Stefan Monnier via Users list for the GNU Emacs text editor writes: >>>> (let ((inhibit-quit t)) >>>> (setq process >>>> (let ((inhibit-quit nil)) >>>> (ftp-setup-buffer host file)))) >>> >>> No. The problem is not in the `setq` itself but in the fact that >>> a non-local exit from `ftp-setup-buffer` (e.g. because of `C-g`) will >>> cause `ftp-setup-buffer` not to return the process. >> >> But at which point is the =E2=80=98quit-flag=E2=80=99 actually handled? > > Doesn't matter. The problem can occur without any quit. If an error is > signaled after creation of the process but before `ftp-setup-buffer` > terminates, the same problem will occur. But, presumably, if an error occurs in =E2=80=98ftp-setup-buffer=E2=80=99 i= t is still =E2=80=98ftp-setup-buffer=E2=80=99 responsibility to handle the error, clea= n-up the process, and, then, maybe, propagate/rethrow the signal, no? (defun ftp-setup-buffer () (let (process) (condition-case err (progn (setq process (start-process =E2=80=A6)) ;; do stuff that may throw an error process ; Could errors still happen here (besides quit)? ; Can quit happen? ) (some-error (and (processp process) (kill-process process)) (signal (car err) (cdr err)))))) --=20 Felix Dietrich