From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wP+bNaUeEWPHdAAAbAwnHQ (envelope-from ) for ; Thu, 01 Sep 2022 23:05:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SH+KNaUeEWMS7wAAauVa8A (envelope-from ) for ; Thu, 01 Sep 2022 23:05:41 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7F46E1E03A for ; Thu, 1 Sep 2022 23:05:41 +0200 (CEST) Received: from localhost ([::1]:38856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTrNc-00070E-6L for larch@yhetil.org; Thu, 01 Sep 2022 17:05:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTrN3-0006yo-DV for bug-guix@gnu.org; Thu, 01 Sep 2022 17:05:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTrN1-0002se-7x for bug-guix@gnu.org; Thu, 01 Sep 2022 17:05:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTrMz-0000v6-Uo for bug-guix@gnu.org; Thu, 01 Sep 2022 17:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57095: 'terminal-window-size' throws ENOTTY ("Inappropriate ioctl for device") Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 01 Sep 2022 21:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57095 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Josselin Poiret Cc: 57095@debbugs.gnu.org, Csepp Received: via spool by 57095-submit@debbugs.gnu.org id=B57095.16620662863511 (code B ref 57095); Thu, 01 Sep 2022 21:05:01 +0000 Received: (at 57095) by debbugs.gnu.org; 1 Sep 2022 21:04:46 +0000 Received: from localhost ([127.0.0.1]:44268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTrMj-0000uZ-WD for submit@debbugs.gnu.org; Thu, 01 Sep 2022 17:04:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTrMh-0000uL-LB for 57095@debbugs.gnu.org; Thu, 01 Sep 2022 17:04:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTrMc-0002pB-6L; Thu, 01 Sep 2022 17:04:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Oww3l9iDW8iLbBCgtTqnoI91w83qe5QhFylBsIfnTt4=; b=XdpJ7xijMm714gl8KKjH PDGpT2b/S2MGZ2bCzcGSAJC1CaYeRCPMOxD3iCSmuf2VJ8Zpg4YNRxMa4/idOdf2X7ODlOEoX5u6J AAoLqJjBO6XLOj5jAqFdeo7esbp0h9mPs+EacSGHjWZEYAnwPxb6h7LE1zBDe0hGymbhzIcRM5nZr M70f9FZNhYxD3IAwd5NcaxNC0jczLnUeccmEtjewJQ8x8zbXbOPqdrC5212R+4g7WFmrwm41zU+q8 9BPU+ud9AbDr6r1F1GgfxfIFTDY2qo0tyGxY7+asXO4NEsE2gMe6sdkhuSdKcP1KlzC33mQhv4mbC OtmJZE4zgDczmw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49206 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTrMb-00036p-P2; Thu, 01 Sep 2022 17:04:37 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <874jylf1v8.fsf@riseup.net> <87bkssjjt5.fsf@jpoiret.xyz> Date: Thu, 01 Sep 2022 23:04:35 +0200 In-Reply-To: <87bkssjjt5.fsf@jpoiret.xyz> (Josselin Poiret's message of "Wed, 10 Aug 2022 15:43:18 +0200") Message-ID: <87bkryztzw.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662066341; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Oww3l9iDW8iLbBCgtTqnoI91w83qe5QhFylBsIfnTt4=; b=mSun0OSmQWBmiFushQQoAmfUZpOIF+Ln35NQ7GYpcClx6iNZTEOFkqWSUJ3Z2h5s/2uY+e B4RVIIhIeiAwNVs+VZMjC+LyYlanl6UrQugiwV/+LXFupCgQKP6pcV9B6FhfNiFvBgL34+ v4JPeqAP7232i55ACkdiGKbXu8qul60zgYr04haPhhmpbGfgvLdonJY/y7BaCFfxWl/7Uw CE/TmFOIA+rQxLff3qf/YcjGZw655lZHgzPvIKwZ4cy8jQghbQIKyJj62+GQOSVhJlfEkD 2MmkCPChcpaHaWcTiFJNSfIDWlL2/wXh/HVGgyI/aPrVP67g0RFH1xP/ct74bg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662066341; a=rsa-sha256; cv=none; b=ABBqDtfAVc2f00EIJtMjCjl7KB894bgUpr5oom3S2hEAmgAph81WIZb2SjEVhWmxi3vI7B 73vfxLj/wKDJkZhAYKyz349k3/FDE52w/rYUutF5q2s7mqHoeHW2/jBqSZRwYm7uBr63Iu /ym4wTeSlBpIBCLyBVdTRGLAmIZVzGYpvFudcoBSkHMRkBsnxY1/GJFTpy34B2OFEcUs8m ayR0FqJAYYqbWY0gVi5BNdKo6nCJo6Hvm7A0xjZTdc+hcOL2NsGl/a9MqG+/OX94CbEK6e Yc9N0QnckfYAiZpC+kjpOBkGCQ2StiFi3uuxJ75oXsNxX1y+aVlPzXoYZxbcyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XdpJ7xij; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XdpJ7xij; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7F46E1E03A X-Spam-Score: -3.68 X-Migadu-Scanner: scn1.migadu.com X-TUID: zo2v6QSqHL2g Hi, Josselin Poiret skribis: > We also use a big wrapping `with-error-handling` to display errors > properly in the case when they are not caught. The difference is that > `with-error-handling` adds a non-unwinding handler, while catch is > unwinding. My first thought was that non-unwinding handlers, even outer > ones would get priority over unwinding ones, since once the stack's > unwound you can't really go back (I have no idea if that last part is > actually true). In practice this is actually false, I tested with a > very simple example, but that lead me to test by setting `#:unwind? #t` > for the `guard*` definition in guix/ui.scm and the issue went away, so I'm > clueless as to why this happens. What seems weird is that the error is > not caught at all! Here=E2=80=99s a reproducer: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (with-exception-handler (lambda _ (catch 'x (lambda (= ) (throw 'x)) (const 'good) )) (lambda () (rmdir "/")) #:unwind? #f) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `x' with args `()'. --8<---------------cut here---------------end--------------->8--- Or, simplified: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (with-exception-handler (lambda _ (with-exception-handler (const 'good) (lambda () (throw 'x)) #:unwind? #t)) (lambda () (rmdir "/")) #:unwind? #f) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `x' with args `()'. --8<---------------cut here---------------end--------------->8--- We expect 'x to be caught, leading the handler to return 'good. Instead, 'x is not caught at all. In both cases, setting #:unwind? #t in the outer =E2=80=98with-exception-handler=E2=80=99 gives the expected result. I spent some time staring at the relevant code in =E2=80=98boot-9.scm=E2=80= =99 but nothing came out of it. Ludo=E2=80=99.