caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Unix.readdir problems
@ 2003-03-19  5:15 Travis Bemann
  0 siblings, 0 replies; only message in thread
From: Travis Bemann @ 2003-03-19  5:15 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-19  5:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-19  5:15 [Caml-list] Unix.readdir problems Travis Bemann

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).