Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] at_exit functions not called during exit
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <tews@t...>
Subject: Re: [Caml-list] at_exit functions not called during exit
Hi,

Warp writes:
   From: "Warp" <warplayer@free.fr>
   Date: Mon, 18 Feb 2002 14:21:47 +0100
   Subject: Re: [Caml-list] at_exit functions not called during exit
   
   [my statment deleted]
   
   If you call the exit() C function in your C-library, it'll exit regardless
   you're using OCaml or any other feature.

No, it calls functions registered via atexit or on_exit, which
can do arbitrary things (including longjumping and continuing).

   BTW, Pervasives.at_exit seems to be only called when an unhandled exception
   reach the top-level.
   
Functions registered via at_exit are at least called during
normal termination. And the manual says

     They will not be called if
     the program terminates because of an uncaught exception.

which is not true in ocaml-3.04.

Bye,

Hendrik
-------------------
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