caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: Kiran Pamnany <kiran@cs.brown.edu>
Cc: Andrej.Bauer@andrej.com,
	Andrej Bauer <Andrej.Bauer@fmf.uni-lj.si>,
	caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Matching problem?
Date: Tue, 14 Aug 2007 15:26:15 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.64.0708141521160.2250@linmac.oyster.ru> (raw)
In-Reply-To: <1187089805.46c18d8d2e514@webmail.cs.brown.edu>

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


  reply	other threads:[~2007-08-14 11:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 16:58 Kiran Pamnany
2007-08-14  8:02 ` [Caml-list] " Andrej Bauer
2007-08-14 11:10   ` Kiran Pamnany
2007-08-14 11:26     ` malc [this message]
2007-08-14 12:57       ` Kiran Pamnany

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0708141521160.2250@linmac.oyster.ru \
    --to=av1474@comtv.ru \
    --cc=Andrej.Bauer@andrej.com \
    --cc=Andrej.Bauer@fmf.uni-lj.si \
    --cc=caml-list@yquem.inria.fr \
    --cc=kiran@cs.brown.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).