Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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

Warp writes:
   From: "Warp" <>
   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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: