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.0 required=5.0 tests=AWL 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 95D9ABC69 for ; Tue, 14 Aug 2007 13:26:30 +0200 (CEST) Received: from comtv.ru (comtv.ru [217.10.32.17]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7EBQTKd018509 for ; Tue, 14 Aug 2007 13:26:30 +0200 X-UCL: actv Received: from av1474.oops ([10.0.66.9] verified) by comtv.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 73802718; Tue, 14 Aug 2007 15:26:25 +0400 Date: Tue, 14 Aug 2007 15:26:15 +0400 (MSD) From: malc X-X-Sender: malc@linmac.oyster.ru To: Kiran Pamnany Cc: Andrej.Bauer@andrej.com, Andrej Bauer , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Matching problem? In-Reply-To: <1187089805.46c18d8d2e514@webmail.cs.brown.edu> Message-ID: References: <1187024336.46c08dd0c1ea7@webmail.cs.brown.edu> <46C161A6.9010601@fmf.uni-lj.si> <1187089805.46c18d8d2e514@webmail.cs.brown.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at concorde with ID 46C19166.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; malc:01 prerr:01 endline:01 printexc:01 usr:01 errno:01 integers:01 prerr:01 endline:01 2007,:98 vale:98 wrote:01 unix:01 unix:01 exception:01 On Tue, 14 Aug 2007, Kiran Pamnany wrote: > 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? >> ~$ grep 38 /usr/include/asm-generic/errno.h #define ENOSYS 38 /* Function not implemented */ # print_int (Obj.magic Unix.EINPROGRESS);; 38- : unit = () I.e. tagged vs plain integers > > It is definitely the connect(). I've put calls to > prerr_endline() calls in each with case. [..snip..] > > Any chance this is because of namespace conflict? > What else could cause this behavior? The first thing that caught my eye yesterday when i read the original posting was this: Unix.Unix_error(UNIX.EINPROGRESS,_,_) (notice the incorrect capitalisation of module name), but i assumed this to be a c&p mistake (which it probably is). -- vale