Browse thread
file mapped bigarray and Unix.unlink
- Matthieu Dubuget
[
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: | Matthieu Dubuget <matthieu.dubuget@m...> |
| Subject: | file mapped bigarray and Unix.unlink |
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