From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] At-exit hook Date: Fri, 8 Nov 2024 10:09:00 +0100 Message-ID: References: <20241107122308.ZnP72D00T42S6aw01nP8co@laurent.telenet-ops.be> <20241107120925.87d4b80c9f289d18eec437ad@gmail.com> <20241107171045.ZsAk2D00S42S6aw01sAkk9@laurent.telenet-ops.be> <20241107195157.5a8cad633d4370bf4c48f21f@gmail.com> <20241107231810.ZyJA2D00E42S6aw01yJAnr@laurent.telenet-ops.be> Reply-To: mikael@djurfeldt.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000afb3fd0626631a21" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21764"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mailer , guile-devel , Mikael Djurfeldt To: Maxime Devos Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Nov 08 10:09:35 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 1t9Kzm-0005Yg-MI for guile-devel@m.gmane-mx.org; Fri, 08 Nov 2024 10:09:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9KzT-000327-Px; Fri, 08 Nov 2024 04:09:15 -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 1t9KzS-00031v-Mr for guile-devel@gnu.org; Fri, 08 Nov 2024 04:09:14 -0500 Original-Received: from mail-ua1-f49.google.com ([209.85.222.49]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9KzR-00032C-8r for guile-devel@gnu.org; Fri, 08 Nov 2024 04:09:14 -0500 Original-Received: by mail-ua1-f49.google.com with SMTP id a1e0cc1a2514c-84fe454176bso842720241.1 for ; Fri, 08 Nov 2024 01:09:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731056952; x=1731661752; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Jqx50Gn+J0mdUB1z0tW0DF+YyKZL7lXK8wNwc+i1huE=; b=fE+f0NmHgjlXsoZgLId5HMdik1oGp6qc0D82YKEoKgc7qZqGO/0FiMwLPvxlgxOGJd vIS+XqEdu0fY+RgGut653Ohwrb7d9YabaBGOO7EsLnvttxy7EeGYcGv83+DtoSnR3PPy zcb5ja3ZUHTyI78vdxVmsKx4VFegjyC/VxZrmp0C4PyRxN8RCwRiXVqtQJ/C0gpefK5K LdMjwz9oYIMFh2osTj3oMw3AGte3vAYZPffAZ825eMk1nMKeYf04K5RP+bBe04HKT68P +dZbtKRmsvbVa1ne0PXh8j2XaAaf4AAhW3cdn3Iqv8tbY3SRSU0tJFWnjBc92MST3xy5 kvhw== X-Forwarded-Encrypted: i=1; AJvYcCVYjernzvDT1CC+79v/DTUg9Gl0+87jFHlKwGpQWnJQ3GBdQJ+Hc6iS6EIDodmRF4W0CzS7zzWrZwRG9w==@gnu.org X-Gm-Message-State: AOJu0YxVOBSMg9q8FumEwmKwVsZqt9cuuw7mODzvNJ9ee5AU9Uk0Evon p/CD86aX4yFzklwu1THppxDuqafEvxP/BYkQM6SqX0fdaley2Q4vWfc1aNydxc3fRIKvkOO74Bo krwyFq0eJlq2VKmbY19jnoH3z7ZE= X-Google-Smtp-Source: AGHT+IGNGoJN1rirRI9fFz0gLmCUhBFEB+i4yE5ifChf25S2l/XafinIO/fH0pPMtMvXk0qyhJ21XZssJ2aLLKAQmyU= X-Received: by 2002:a05:6102:3f4d:b0:4a4:849b:760c with SMTP id ada2fe7eead31-4aae1685bb0mr2415055137.18.1731056951601; Fri, 08 Nov 2024 01:09:11 -0800 (PST) In-Reply-To: <20241107231810.ZyJA2D00E42S6aw01yJAnr@laurent.telenet-ops.be> Received-SPF: pass client-ip=209.85.222.49; envelope-from=mdjurfeldt@gmail.com; helo=mail-ua1-f49.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:22768 Archived-At: --000000000000afb3fd0626631a21 Content-Type: text/plain; charset="UTF-8" Hi all, I've come to the conclusion that this problem is unsolvable and I will abandon the idea of an at-exit-hook. The most serious potential consequence of running it in really_cleanup_for_exit(), which is indirectly invoked through atexit(), is that the resources to clean up or the Guile library itself has already been deallocated. Also, calling it from scm_boot_guile is a half measure since the application might exit from main_func(). I thank Chris and Maxime for pointing out the problems. I actually think that I tried to do this (introduce an at-exit-hook) 25 years ago, with the same eventual realizations, but didn't recall that at first. Brace for 2050! :-)) Best regards, Mikael --000000000000afb3fd0626631a21 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

I've come to the= conclusion that this problem is unsolvable and I will abandon the idea of = an at-exit-hook. The most serious potential consequence of running it in re= ally_cleanup_for_exit(), which is indirectly invoked through atexit(), is t= hat the resources to clean up or the Guile library itself has already been = deallocated.

Also, calling it from scm_boot_guile = is a half measure since the application might exit from main_func(). I than= k Chris and Maxime for pointing out the problems.

= I actually think that I tried to do this (introduce an at-exit-hook) 25 yea= rs ago, with the same eventual realizations, but didn't recall that at = first. Brace for 2050! :-))

Best regards,
Mikael

--000000000000afb3fd0626631a21--