From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL,URI_NOVOWEL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id EB652BC69 for ; Tue, 14 Aug 2007 13:10:10 +0200 (CEST) Received: from pepper.cs.brown.edu (pepper.cs.brown.edu [128.148.32.123]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7EBAAHe012415 for ; Tue, 14 Aug 2007 13:10:10 +0200 Received: from localhost (localhost [127.0.0.1]) by pepper.cs.brown.edu (Postfix) with ESMTP id D66A6937F0; Tue, 14 Aug 2007 07:10:09 -0400 (EDT) Received: from pepper.cs.brown.edu ([127.0.0.1]) by localhost (pepper.cs.brown.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4es8rSlVR40e; Tue, 14 Aug 2007 07:10:09 -0400 (EDT) Received: from null.cs.brown.edu (null.cs.brown.edu [128.148.38.190]) by pepper.cs.brown.edu (Postfix) with ESMTP id B85E7937A8; Tue, 14 Aug 2007 07:10:05 -0400 (EDT) Received: by null.cs.brown.edu (Postfix, from userid 33) id 4204E5B4002; Tue, 14 Aug 2007 07:10:05 -0400 (EDT) Received: from c-66-31-209-180.hsd1.ma.comcast.net (c-66-31-209-180.hsd1.ma.comcast.net [66.31.209.180]) by webmail.cs.brown.edu (IMP) with HTTP for ; Tue, 14 Aug 2007 07:10:05 -0400 Message-ID: <1187089805.46c18d8d2e514@webmail.cs.brown.edu> Date: Tue, 14 Aug 2007 07:10:05 -0400 From: Kiran Pamnany To: Andrej.Bauer@andrej.com, Andrej Bauer Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Matching problem? References: <1187024336.46c08dd0c1ea7@webmail.cs.brown.edu> <46C161A6.9010601@fmf.uni-lj.si> In-Reply-To: <46C161A6.9010601@fmf.uni-lj.si> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Originating-IP: 66.31.209.180 X-Miltered: at concorde with ID 46C18D92.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; prerr:01 endline:01 printexc:01 prerr:01 endline:01 non-blocking:01 unix:01 unix:01 exception:01 exception:01 caml-list:01 match:02 output:02 supported:02 string:02 Thanks for the response. > > ... > > begin try > > syscall (fun () -> Unix.connect s ... > > ... > > with > > Unix.Unix_error(UNIX.EINPROGRESS,_,_) -> ... > > | Unix.Unix_error(e,_,_) -> ... > > | err -> prerr_endline (Printexc.to_string err) > > done; > > ... > > > > The output for this is: > > > > Unix.Unix_error(38, "connect", "") > > > > How is this possible? > > I am just guessing, but the exception handler for the second case calls > Unix.close on line 963, which could raise a further exception that would > not get caught. Also some of the Unix.xxx calls before the begin..try > block could raise an exception. The odd thing is you're getting > Unix_error(_, "connect", _), i.e., as if the actual call to Unix.connect > causes it. By the way, isn't error 38 "function not supported"? What > does that tell us? > It is definitely the connect(). I've put calls to prerr_endline() calls in each with case. 38 is EINPROGRESS. I've verified this in a couple of ways. First, the simple client (that works) causes the first with case to be entered (because the socket is set to non-blocking, this is the usual case). The print there outputs 38. Second, I put a try-with block in xmlRPCClient.ml, around the call which causes connect_server() to be invoked. The with case there is written EINPROGRESS and it catches this exception. I'm at a loss. I would suspect the code generated to match the with patterns but this is in a library and it works with one client and not another. Any chance this is because of namespace conflict? What else could cause this behavior? K ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.