From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id GAA10999; Wed, 19 Mar 2003 06:35:59 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA10378 for ; Wed, 19 Mar 2003 06:35:57 +0100 (MET) Received: from smtp3.wiscmail.wisc.edu (blitzen.doit.wisc.edu [144.92.197.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2J5ZuX10047 for ; Wed, 19 Mar 2003 06:35:56 +0100 (MET) Received: from conversion-daemon.smtp3.doit.wisc.edu by smtp3.doit.wisc.edu (iPlanet Messaging Server 5.2 HotFix 1.05 (built Nov 6 2002)) id <0HBZ00H01E7D3N@smtp3.doit.wisc.edu> for caml-list@inria.fr; Tue, 18 Mar 2003 23:35:55 -0600 (CST) Received: from kryogenik (gilm022-013.resnet.wisc.edu [146.151.22.13]) by smtp3.doit.wisc.edu (iPlanet Messaging Server 5.2 HotFix 1.05 (built Nov 6 2002)) with ESMTP id <0HBZ00HCGE7U8M@smtp3.doit.wisc.edu> for caml-list@inria.fr; Tue, 18 Mar 2003 23:35:54 -0600 (CST) Received: from tabemann by kryogenik with local (Exim 3.35 #1 (Debian)) id 18vVuv-0002Nd-00 for ; Tue, 18 Mar 2003 23:15:09 -0600 Date: Tue, 18 Mar 2003 23:15:09 -0600 From: Travis Bemann Subject: [Caml-list] Unix.readdir problems To: caml-list@inria.fr Message-id: <20030319051509.GB9077@wisc.edu> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.3.28i X-Spam: no; 0.00; bemann:01 readdir:01 opendir:01 closedir:01 runtime:01 bug:01 workarounds:01 bytecode:01 rec:01 native:02 unix:02 let:04 glibc:06 path:06 strings:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've been having significant problems with using Unix.readdir, where instead of actually returning directory items in strings, it returns empty strings for each directory item that it would return otherwise, in multithreaded *native* code, in the context: (* Get the contents of a directory. *) let scan_dir path = let dir = Unix.opendir path in let rec step acc = try step ((Unix.readdir dir) :: acc) with End_of_file -> List.rev acc in let items = step [] in Unix.closedir dir; items The code this is run in is multithreaded, but this problem only shows up when the code is running as native code, rather than being run by the bytecode runtime. Note that I'm running Debian 2.2, but with a newer glibc than the one that came with it as distributed (i think). I know there's a bug tracker item for this, and a not-very-useful response to it, both of which are in French; however, it did not appear to mention it working as bytecode but not as native, or what any possible workarounds or solutions to be. Anyone have any knowledge about this and how to either solve or work around this? ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners