From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA10761; Fri, 14 Nov 2003 19:35:27 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA10534 for ; Fri, 14 Nov 2003 19:35:23 +0100 (MET) Received: from bob.west.spy.net (mail.west.spy.net [66.149.231.226]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAEIZL105611; Fri, 14 Nov 2003 19:35:21 +0100 (MET) Received: from [10.9.254.240] (sjc-dist3-e3.2wire.com [63.203.253.2]) by bob.west.spy.net (Postfix) with ESMTP id C3FF369CE; Fri, 14 Nov 2003 10:35:16 -0800 (PST) In-Reply-To: <70D8AC5D-16A8-11D8-BFCA-00039310CAE8@inria.fr> References: <70D8AC5D-16A8-11D8-BFCA-00039310CAE8@inria.fr> Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <4A73AF35-16D1-11D8-9BF4-000393CFE6B8@spy.net> Content-Transfer-Encoding: 7bit Cc: Caml Mailing List From: Dustin Sallings Subject: Re: [Caml-list] GC and file descriptors Date: Fri, 14 Nov 2003 10:35:16 -0800 To: Damien Doligez X-Mailer: Apple Mail (2.606) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 damien:01 subprocesses:01 finalization:01 conceptually:01 finalization:01 garbage:01 descriptors:01 descriptors:01 doligez:01 nov:01 finalisation:02 unit:03 wrote:03 unavailable:95 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Nov 14, 2003, at 5:42, Damien Doligez wrote: >> Garbage collecting the subprocesses and file descriptors would make >> this a bit more straightforward. > > The problem with this approach is that the "close" and "wait" > system calls have side effects. I don't like the idea of a GC > that has side effects other than the memory size of the program > (and finalisation functions, of course). But what is the purpose of a finalization function that doesn't have a side effect? They are defined as (;a -> unit) which implies to me that the only purpose of the thing is to produce a side effect. close() seems to be conceptually the same finalization as free() to me. It releases a system resource back to the process that would otherwise be unavailable forever. -- Dustin Sallings ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners