caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kiran Pamnany <kiran@cs.brown.edu>
To: Andrej.Bauer@andrej.com, Andrej Bauer <Andrej.Bauer@fmf.uni-lj.si>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Matching problem?
Date: Tue, 14 Aug 2007 07:10:05 -0400	[thread overview]
Message-ID: <1187089805.46c18d8d2e514@webmail.cs.brown.edu> (raw)
In-Reply-To: <46C161A6.9010601@fmf.uni-lj.si>

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.


  reply	other threads:[~2007-08-14 11:10 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 [this message]
2007-08-14 11:26     ` malc
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=1187089805.46c18d8d2e514@webmail.cs.brown.edu \
    --to=kiran@cs.brown.edu \
    --cc=Andrej.Bauer@andrej.com \
    --cc=Andrej.Bauer@fmf.uni-lj.si \
    --cc=caml-list@yquem.inria.fr \
    /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).