From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.user Subject: Re: Module unloading Date: Thu, 26 May 2005 13:57:50 -0500 Message-ID: <87wtplerwx.fsf@trouble.defaultvalue.org> References: <38294b74050523070378b75caf@mail.gmail.com> <42921E8E.7060503@ossau.uklinux.net> <38294b74050523135563afe3dc@mail.gmail.com> <429249E3.1050604@ossau.uklinux.net> <38294b7405052406021c0ec40f@mail.gmail.com> <42936F3C.3090409@ossau.uklinux.net> <87r7fwmimt.fsf@trouble.defaultvalue.org> <429618C2.40909@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1117133963 14676 80.91.229.2 (26 May 2005 18:59:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 May 2005 18:59:23 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu May 26 20:59:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DbNYk-00073S-9B for guile-user@m.gmane.org; Thu, 26 May 2005 20:58:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbNcr-0002c7-O0 for guile-user@m.gmane.org; Thu, 26 May 2005 15:02:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DbNcF-0002Ps-Ts for guile-user@gnu.org; Thu, 26 May 2005 15:02:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DbNcB-0002ND-7w for guile-user@gnu.org; Thu, 26 May 2005 15:01:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbNcA-0002M1-Pr for guile-user@gnu.org; Thu, 26 May 2005 15:01:54 -0400 Original-Received: from [66.93.216.237] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DbNYw-0005VC-VY for guile-user@gnu.org; Thu, 26 May 2005 14:58:35 -0400 Original-Received: from trouble.defaultvalue.org (omen.defaultvalue.org [192.168.1.1]) by defaultvalue.org (Postfix) with ESMTP id 23AF040DB; Thu, 26 May 2005 13:57:51 -0500 (CDT) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id AD45B410DD; Thu, 26 May 2005 13:57:50 -0500 (CDT) Original-To: Neil Jerram In-Reply-To: <429618C2.40909@ossau.uklinux.net> (Neil Jerram's message of "Thu, 26 May 2005 19:43:14 +0100") User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:4594 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4594 Neil Jerram writes: > What happens "inside" the library when it is dlopened? I thought > nothing, so I doubt that loading and unloading per se would be a > problem. > > If a single program called scm_init_guile() twice without the library > being unloaded and reloaded first ... I doubt the code would handle > that, but I'd say this is incorrect use of the API. > > If a single program calls scm_init_guile(), later unloads libguile, > the reloads libguile and calls scm_init_guile() ... I'd say this > _ought_ to work, and it probably mostly does as long as reloading > reinitializes libguile's global data. Since there is no > scm_term_guile(), though, I suspect we would also have leaked a lot of > memory on the heap. I was also concerned about any pending signals, callbacks registered with other libraries, or anything else that has been set up by code executed from guile. I was concerned that there may be trouble unless there's some way of enumerating all of these things and undoing them, and that seems like it might be difficult in the general case. -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user