Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] file mapped bigarray and Unix.unlink
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-07-02 (12:43)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] file mapped bigarray and Unix.unlink


> > 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 discomfort.  Have you considered issuing a sync after
the unlink?  For efficiency reasons the OS may not actually be deleting
the file immediately after the unlink; the sync should force it to do it.

Dario Teixeira