[Caml-list] file mapped bigarray and Unix.unlink

2009-07-02 Thread Matthieu Dubuget
Hello, I have difficulties to delete one file (name: fn, file descriptor: fdesc) with Unix.unlink fn. I suspect that this is because I have a bigarray ba mapped with fdesc. Is it a possible reason? At some point, I want to delete fn because the saving operation was cancelled by the user. I

Re: [Caml-list] file mapped bigarray and Unix.unlink

2009-07-02 Thread Matthieu Dubuget
Solved! Sorry for the noise. The operating systems takes time to free the file descriptor. The strategy I adopted is to spawn a recursive thread that periodically try to erase the file until success. Salutations ___ Caml-list mailing list.

Re: [Caml-list] file mapped bigarray and Unix.unlink

2009-07-02 Thread Matthieu Dubuget
| Sujet : « Re: [Caml-list] file mapped bigarray and Unix.unlink » | Pour : « matthieu.dubu...@gmail.com » | De : « David MENTRE dmen...@linux-france.org » | Le Thu Jul 02 2009 11:49:33 GMT+0200 (CEST) Hello Mathieu, 2009/7/2 Matthieu Dubuget matthieu.dubu...@gmail.com: The strategy I

Re: [Caml-list] file mapped bigarray and Unix.unlink

2009-07-02 Thread Dario Teixeira
Hi, The strategy I adopted is to spawn a recursive thread that periodically try to erase the file until success. That seems the wrong solution to me. The unlink syscall should work immediately or you have another reason why it only works after a certain time. I second David's

Re: [Caml-list] file mapped bigarray and Unix.unlink

2009-07-02 Thread Florian Hars
Matthieu Dubuget schrieb: Any idea? You are probably using windows, which is a bit weird about operations on open files. - Florian. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

RE: [Caml-list] How to use -cclib correctly?

2009-07-02 Thread Christoph Bauer
I think the error message is from flexlink. So try ocamlopt -cclib -link -cclib /MT /link /SUBSYSTEM:WINDOWS -o birthday.exe birthday.ml http://birthday.ml/ Christoph Bauer From: caml-list-boun...@yquem.inria.fr

[Caml-list] How to use -cclib correctly?

2009-07-02 Thread Andre Tampubolon
I'm compiling a simple program (Ocaml 3.11.0, MSVC version): ocamlopt -cclib /MT /link /SUBSYSTEM:WINDOWS -o birthday.exe birthday.ml The output is: ** Fatal error: Cannot find file /MT File caml_startup, line 1, characters 0-1: Error: Error during linking How to use the -cclib option correctly?