From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 0FCD3BB81 for ; Fri, 12 Nov 2004 02:07:16 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAC17F3H020032 for ; Fri, 12 Nov 2004 02:07:15 +0100 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 CAA02695 for ; Fri, 12 Nov 2004 02:07:15 +0100 (MET) Received: from paris.dvs1.informatik.tu-darmstadt.de (paris.dvs1.informatik.tu-darmstadt.de [130.83.166.129]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAC17Ekp020025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 12 Nov 2004 02:07:14 +0100 Received: by paris.dvs1.informatik.tu-darmstadt.de (Postfix, from userid 11060) id 4A8C94EAF4; Fri, 12 Nov 2004 02:07:14 +0100 (CET) Date: Fri, 12 Nov 2004 02:07:12 +0100 From: "Wesley W. Terpstra" To: "Christopher A. Watford" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Patch: kill() undex win32 Message-ID: <20041112010712.GA3886@muffin> References: <20041111104847.GA5087@muffin> <20041111125455.GA5958@muffin> <8008871f04111115426eb9c613@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8008871f04111115426eb9c613@mail.gmail.com> User-Agent: Mutt/1.5.6+20040722i X-Miltered: at concorde with ID 41940CC3.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41940CC2.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; tu-darmstadt:01 caml-list:01 wrote:01 'user':01 ocaml:01 ocaml:01 ctrl-c:01 thread:02 quits:02 suggestion:03 let:03 interpret:04 exit:04 exit:04 unlikely:04 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Thu, Nov 11, 2004 at 06:42:04PM -0500, Christopher A. Watford wrote: > Might I ask why 0x80 is being returned as the exit code instead of > something from winbase.h (auto from windows.h) like: > > STATUS_CONTROL_C_EXIT I didn't have any particular reason for choosing that value. If you think that STATUS_CONTROL_C_EXIT makes more sense under windows, then I'm all for that (esp. since you knew it existed and thus more than I). Mostly I didn't want it to be near 'user' returnable values like 0,1,2,... and also not near syscall return values -1,... 0x80 seemed to be a good middle ground. ;) Another suggestion might be to use the signal number itself for the return code. At least for me the return code is irrelevant; I just need to be able to kill my child processes when the ocaml program quits abnormally. > Which, while it is not the case that exactly is happening, it does let > the user know with a fairly standard method as to what happened to > their thread/process. I'd like to point out that this patch can only work for child processes created from the ocaml program. So, I think it's unlikely that there is a user involved to interpret the CTRL-C, or even be concerned that the process vanished. PS. Did you try the patch? Does it work? -- Wesley W. Terpstra