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 15:14:39 +0200 Message-ID: <86o70sm1ts.fsf@gnu.org> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87h66loc17.fsf@gmail.com> <878qrxoayj.fsf@gmail.com> <8734i5o6wc.fsf@gmail.com> <87cyh9mpn5.fsf@gmail.com> <874j2l1hei.fsf@protonmail.com> <874j2lmd37.fsf@gmail.com> <87msgdkt29.fsf@gmail.com> <86h66lnjrt.fsf@gnu.org> <868qrxnfrw.fsf@gnu.org> <87a5ccl2zx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6066"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, pipcet@protonmail.com, spd@toadstyle.org, emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 31 14:15:56 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 1tSc6G-0001Pm-AB for ged-emacs-devel@m.gmane-mx.org; Tue, 31 Dec 2024 14:15:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSc5R-00043E-2a; Tue, 31 Dec 2024 08:15:05 -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 1tSc5P-00041K-1x for emacs-devel@gnu.org; Tue, 31 Dec 2024 08:15:03 -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 1tSc5N-0006yt-Pz; Tue, 31 Dec 2024 08:15:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=U84zGziMxUjNS125vAFClvRrD+iRztB+FjZKTar5WSU=; b=ef51/myrlrssSC4sEcBq fBE5t06xqEqlqAzKjUZ5Dihcm50NNJIinl1HhvklEKgNUdB4T2g7/l4nWOvDU/0MtvwZhl03pTtsU 39wkK9pSPMreDxgWH0e4/qVQ8HLFq5cFvR+QseZfdk4pnAGcF/ez3Xy6LJz08SnEMFW5p4LNNk4fC 5FvptVveC7MwiX+k660IA50iLdk+vWLD9LBGQDo5x9Tn73FS2tOI2m5/OIoChEgvuA+k+9mpNOCjy MHVKewvHZqlyusSGOCNUwx/JWY863DIYSL7WInLyUOBnuM0OMQ7dc9YkAyLNZM70VTv2caqrpluGD RgtBPsrWz3M6dQ==; In-Reply-To: <87a5ccl2zx.fsf@gmail.com> (message from Helmut Eller on Tue, 31 Dec 2024 08:34:42 +0100) 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:327499 Archived-At: > From: Helmut Eller > Cc: Eli Zaretskii , pipcet@protonmail.com, > spd@toadstyle.org, emacs-devel@gnu.org > Date: Tue, 31 Dec 2024 08:34:42 +0100 > > On Mon, Dec 30 2024, Gerd Möllmann wrote: > > > Eli Zaretskii writes: > > > >>> From: Gerd Möllmann > >>> Cc: Helmut Eller , pipcet@protonmail.com, > >>> spd@toadstyle.org, emacs-devel@gnu.org > >>> Date: Mon, 30 Dec 2024 19:37:38 +0100 > >>> > >>> So, to summarize, everyone agrees with Helmut? > > Except the POSIX police: it says that pthread_mutex_trylock isn't async > signal safe. I suppose this also makes it's unsafe to use MPS's fault > handler in an async signal handler. Bummer. (Does the police take > bribes?) Doesn't MPS itself call it from a SIGSEGV handler? > I wonder if the backtrace that we see in the signal handler is any > different from the backrace that we would see at the next safe point > (i.e. the next time maybe_quit is called). I think we cannot rely on that, because maybe_quit must be called by hand, it isn't magic. We call it from various places in the interpreter, which could well be in some other place of a Lisp program. Once again, why not ask the MPS folks to give us a callback? Or maybe we could try hacking MPS ourselves first, to see if that does the job, and ask them then?