From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] At-exit hook Date: Thu, 7 Nov 2024 21:08:16 +0900 Message-ID: References: <20241107122308.ZnP72D00T42S6aw01nP8co@laurent.telenet-ops.be> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000007dca90626517e8a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30556"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "mikael@djurfeldt.com" , guile-devel To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Nov 07 13:08:51 2024 Return-path: Envelope-to: guile-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 1t91Jj-0007lB-Jk for guile-devel@m.gmane-mx.org; Thu, 07 Nov 2024 13:08:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t91JV-0006dy-Rb; Thu, 07 Nov 2024 07:08:37 -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 1t91JT-0006ci-GB for guile-devel@gnu.org; Thu, 07 Nov 2024 07:08:35 -0500 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t91JR-0004f0-4x for guile-devel@gnu.org; Thu, 07 Nov 2024 07:08:35 -0500 Original-Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2e2b549799eso697118a91.3 for ; Thu, 07 Nov 2024 04:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730981309; x=1731586109; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ia9IlzomxMmeC4DKFlkpz244P4MFRoZUqr+PQqQWhV8=; b=EG/khw318AFpPECEmUa1hXJ8ED/GSedO4ah87WLQIlCHXhpx8+gFe2C5TIvqcj71F9 U/y3DVSEhd+YNSP0v6Y5YnncoFo5Ut0EwBtTMcYxop0SO058P0A4JYVWR1CEV4V1N73W BHFX7jTnyGqixQK2s+f1YP9u+VtpURblyRdXHhs8YIhPVz/qoUU3e8kRFNqO/TTOjwVc CbQwMRDSdhTUJEEcUq4r90mAHx2LdQIyxwbN0L9eN4acJRGZOECUDDnsUGMJaX2P7eUZ +lnPqzQhhtNGwPBf5mrhuiws+nJKc97UJEwTPUFkSpR+4M69MVBNCBto+MqdzR2e7k7G vv2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730981309; x=1731586109; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ia9IlzomxMmeC4DKFlkpz244P4MFRoZUqr+PQqQWhV8=; b=BZjnc1EwBFIIaHHhOmMfEi1njOSmqxsh46NZMPMpdHHcUQypSaYIa5/0ouCqjplZLF DvPttzg0DPwUl6wY/xa8HaAxyKBBNZbVIbSr1orfKZ7bG2VvI6l88rvDMN+9vwPOQOcY GOHnVjSs7mfMiFOrvbdXbtfV8fRfTELPZJ0KHz4Pegg1pwruX0SRH2OoOMMHqa4Qq9qi kqj6xotAnHX0apaTEy/tRZafOuSFhS7TzR6aR3timtPjLb4Q/hEjaqkhPFDhlTGcCI4i Xp6+BrcT+3jYwXIxdzoumiEaZIs5qgy9SqzR6M7HV4KFROwiZS3QCYeZxHM0g6O7ibni u8+A== X-Forwarded-Encrypted: i=1; AJvYcCWHR8ufeFLwOncTagEPBtZyM6KtQpbavloa6PUFKTGfn/svwOzQ+9/rCyPZi+u/POzCLDQQSRWiHbXBPQ==@gnu.org X-Gm-Message-State: AOJu0YyuN/GXzEVXVmbr5bWMhQv13etYkC+rAS2vzQNjLrK8xNUYVx3f gYMLR3a67nzRfO5GbPsRvZ3i7LKUcGh0TOhZW4NxeaQGT1VdsT/qA4BBZPKLgSj5SFFbl7kjUE5 3DWOaYnsvOu22WN5CLUWvIuco11WE5JJC X-Google-Smtp-Source: AGHT+IEE2Ja/ToqT4x8JhwKHq0IY0UG35NKzHlhupOsm5bB8SoIvbGFH6Mr7yU7p8QxEr8hZsED4TNdKzWzJaV59C9k= X-Received: by 2002:a17:90b:1d0d:b0:2e2:b513:d534 with SMTP id 98e67ed59e1d1-2e94c533121mr32493977a91.37.1730981308912; Thu, 07 Nov 2024 04:08:28 -0800 (PST) In-Reply-To: <20241107122308.ZnP72D00T42S6aw01nP8co@laurent.telenet-ops.be> Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=nalaginrut@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22762 Archived-At: --00000000000007dca90626517e8a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable How about using sigprocmask to disable async signals temporarily? On Thu, Nov 7, 2024 at 8:23=E2=80=AFPM Maxime Devos wrote: > =E2=80=98atexit=E2=80=99 functions are run at =E2=80=98exit=E2=80=99. =E2= =80=98exit=E2=80=99 can be run from signal > handlers (*). Since the hook runs Scheme code, it could do a lot of > AC-unsafe things, resulting in problems. > > > > (*) glibc documentation says =E2=80=98exit=E2=80=99 is AC-unsafe, but thi= s is unsupported > by POSIX AFAICT. OTOH the same applies to even =E2=80=98malloc=E2=80=99, = so likely I=E2=80=99m > looking in the wrong places. > > > > Best regards, > > Maxime Devos > --00000000000007dca90626517e8a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
How about using sigprocmask to disable async signals tempo= rarily?


On Thu, Nov 7, 2024 at 8:23=E2=80=AFPM Maxime Devos &= lt;maximedevos@telenet.be>= wrote:

=E2=80=98atexit=E2=80=99 functions are run at = =E2=80=98exit=E2=80=99. =E2=80=98exit=E2=80=99 can be run from signal handl= ers (*). Since the hook runs Scheme code, it could do a lot of AC-unsafe th= ings, resulting in problems.

=C2=A0

(*) glibc documentation says =E2=80=98exit=E2=80=99 i= s AC-unsafe, but this is unsupported by POSIX AFAICT. OTOH the same applies= to even =E2=80=98malloc=E2=80=99, so likely I=E2=80=99m looking in the wro= ng places.

=C2=A0

Best regards,

Maxime Devos

--00000000000007dca90626517e8a--