Browse thread
Uncaught Unix_error.
-
Romain Beauxis
-
Stéphane_Glondu
- Romain Beauxis
-
David Baelde
- Jake Donham
- Stéphane Glondu
-
Stéphane_Glondu
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Stéphane Glondu <steph@g...> |
| Subject: | Re: [Caml-list] Uncaught Unix_error. |
David Baelde a écrit :
> Both liquidsoap and ocaml-duppy are compiled with -threads, so they
> are using the same version of Unix. Duppy is not linked against Unix,
> only requires it through ocamlfind. Could it be that ocamlfind (on
> some versions) links Unix twice in liquidsoap? I did not know it was
> even possible (except with Dynlink).
^^^^^^^^^^^^^^^^^^^
Are you sure Dynlink is not used at all in the circumstances of the bug?
> Also, note that the call to read that raises the error is from the
> same module that tries to catch the exception.
If Jake is right, a call to Unix.read might not be catchable even in the
same module.
> I'm lost, I'd like to understand when the exception is registered: at
> runtime initialization? In this case, only one should ever be
> registered (at least it seems easy to enforce). Or is it statically
> registered somehow?
The exception is registered when the module is evaluated. This can
happen at program startup, or during a call to Dynlink.load_file. Note
that if Unix is linked in a cmxs file and you dynload it, you will face
trouble.
--
Stéphane