From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 88922BC37 for ; Thu, 2 Jul 2009 10:10:09 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAH4ITErUSdLq/2dsb2JhbADPKIQRBQ X-IronPort-AV: E=Sophos;i="4.42,331,1243807200"; d="scan'208";a="29132521" Received: from papillon.metalscan.fr ([212.73.210.234]) by mail2-smtp-roc.national.inria.fr with ESMTP; 02 Jul 2009 10:10:08 +0200 Received: from [192.168.0.102] (helo=[192.168.0.102]) by papillon.metalscan.fr with esmtp (Exim 3.36 #1 (Debian)) id 1MMHMy-0004yj-00 for ; Thu, 02 Jul 2009 10:10:12 +0200 Message-ID: <4A4C6B5F.5060305@metalscan.fr> Date: Thu, 02 Jul 2009 10:10:07 +0200 From: Matthieu Dubuget Reply-To: matthieu.dubuget@metalscan.fr Organization: Metalscan User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: caml-list@inria.fr Subject: file mapped bigarray and Unix.unlink X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 bigarray:01 bigarray:01 unix:01 unix:01 descriptor:02 binding:02 rename:04 erased:05 fails:05 suspect:09 memory:09 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