From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Tue, 31 Dec 2024 16:34:49 +0200 Message-ID: <867c7fncom.fsf@gnu.org> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87msgdkt29.fsf@gmail.com> <86h66lnjrt.fsf@gnu.org> <868qrxnfrw.fsf@gnu.org> <87a5ccl2zx.fsf@gmail.com> <875xn0p3l1.fsf@protonmail.com> <86ldvwm190.fsf@gnu.org> <87cyh8nczh.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8527"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eller.helmut@gmail.com, gerd.moellmann@gmail.com, spd@toadstyle.org, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 31 15:35:27 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tSdLC-00023x-Op for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Dec 2024 15:35:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSdL2-0005c3-6V; Tue, 31 Dec 2024 09:35:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSdKq-0005V7-Gp for emacs-devel@gnu.org; Tue, 31 Dec 2024 09:35:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSdKq-0005tE-0T; Tue, 31 Dec 2024 09:35:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=I/L61fcDSHHC5T29yIxnYxRcenKOdqRXO4uhA+Ppois=; b=LbM+Vtz/IMcE TUa1+f+tHAMU6jejPEPu9HNUVc6LkoprJCBp6GFFC05vhoNWfRGpNrEUNdHTm2hiSlWjZPwuU55Ge hLStHChdish4l9uM6L811pwOvCUeXQShFbxY2rD1bpWxwTp+y4dskHWvXa35UmBB4i0QmD769HOHs JSbUrB6LYXl4WhJkbKiibdxwx1lKiT4f8bMGGoRLAbB6EMVk6uKl7dFCGaz4Tgxkwpk3W+WAoymfw NSWZDIyFHDQ8qSqPOv+99yva4+3nm5rY1zShXrjzj8SNiT5y75h1o46LSCbiZ88nC9v9+6oAjDclY lobbAtjXbhBda4wZqgYQlA==; In-Reply-To: <87cyh8nczh.fsf@protonmail.com> (message from Pip Cet on Tue, 31 Dec 2024 14:29:18 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327516 Archived-At: > Date: Tue, 31 Dec 2024 14:29:18 +0000 > From: Pip Cet > Cc: eller.helmut@gmail.com, gerd.moellmann@gmail.com, spd@toadstyle.org, emacs-devel@gnu.org > > "Eli Zaretskii" writes: > > >> maybe_quit is not a great safe point, it's just the best we have. It's > >> insufficient if Emacs becomes idle, and how often we call rarely_quit > >> is quite unpredictable. > > > > What about doing that from process_pending_signals? > > Yes. The rest of this email is a half-hearted defense of why I didn't > do that right away. > > We certainly want to call it from unblock_to if the count reaches (I > think that's what you meant?), but I wasn't convinced we wouldn't need a > shadow signal mask for that. > > Merging the pending_signals flag in keyboard.c and the one in igc.c (if > that's what you meant) sounds like a good idea, too, but needs some more > thought: if we handle some signals while input is blocked, but not > others, what should pending_signals be? We'd need to add a new function to process_pending_signals, which would process SIGPROF and maybe also SIGALRM. The signal handlers for those would then only set a flag (not pending_signals, some other flag).