From: Matthieu Dubuget <matthieu.dubuget@metalscan.fr>
To: caml-list@inria.fr
Subject: file mapped bigarray and Unix.unlink
Date: Thu, 02 Jul 2009 10:10:07 +0200 [thread overview]
Message-ID: <4A4C6B5F.5060305@metalscan.fr> (raw)
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 assure that the binding to ba is lost.
Then, I close the file handle with
"Unix.close fdesc;"
At this point,
"Unix.rename fn g;" works, but
"Unix.unlink fn;" fails with : Permission denied error.
following my idea that this can be due to the fact that fn is mapped in
memory, I tried to insert a Gc.compact, in order for ba to be erased:
Unix.close fdesc;
Gc.compact ();
Unix.unlink fn;
but got the same error message.
Any idea?
Salutations
Matt
next reply other threads:[~2009-07-02 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 8:10 Matthieu Dubuget [this message]
2009-07-02 8:54 ` [Caml-list] " Matthieu Dubuget
2009-07-02 9:49 ` David MENTRE
2009-07-02 10:15 ` Matthieu Dubuget
2009-07-02 12:48 ` Florian Hars
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=4A4C6B5F.5060305@metalscan.fr \
--to=matthieu.dubuget@metalscan.fr \
--cc=caml-list@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).