From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 6DF2DBC75 for ; Thu, 17 Feb 2005 22:17:24 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1HLHNCi022627 for ; Thu, 17 Feb 2005 22:17:24 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA07715 for ; Thu, 17 Feb 2005 22:17:23 +0100 (MET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1HLHMaY022622 for ; Thu, 17 Feb 2005 22:17:23 +0100 Received: by wproxy.gmail.com with SMTP id 69so349962wri for ; Thu, 17 Feb 2005 13:17:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=sK6efFx0g0t8oEoJNBPRjSKFMyqot2UTdEnSCNW8pB/YuVJNpcfGoRV1lLkD7tOIg+vP0KJ6O03c8RfhtreCDToSxsaHUuqub6bAHnUioHTiJSGqurlPLULsKUj0K/M2Xj69LTNM/Jxr2SFcuQ8Z5xtvBhtrZy53BGMUSkKUGuo= Received: by 10.54.48.5 with SMTP id v5mr84461wrv; Thu, 17 Feb 2005 13:17:20 -0800 (PST) Received: by 10.54.2.70 with HTTP; Thu, 17 Feb 2005 13:17:20 -0800 (PST) Message-ID: <891bd339050217131757152374@mail.gmail.com> Date: Thu, 17 Feb 2005 16:17:20 -0500 From: Yaron Minsky Reply-To: yminsky@cs.cornell.edu To: Caml Mailing List Subject: getting more information on_exit Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 421509E4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 421509E2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 ocamlmpi:01 ocamlmpi:01 yaron:01 exception:01 unit:02 exits:02 unexpected:03 mpi:04 context:04 exit:04 exit:04 finalize:05 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: Does anyone know if it's possible to get more information from the on_exit call? Right now, the on_exit call just gets unit. It would be useful, for example, to get the exit code. That would allow one to distinguish between an ordinary exit and an exceptional one. The context in which I'm looking at this is ocamlmpi. Right now, ocamlmpi calls the MPI finalize function on exit. This is all well and good in normal situations, but when an unexpected exception is thrown, it would be better to call the abort function. If I could distinguish between different kinds of exits, this would be easy to implement. Yaron