caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Travis Bemann <tabemann@wisc.edu>
To: caml-list@inria.fr
Subject: [Caml-list] Unix.readdir problems
Date: Tue, 18 Mar 2003 23:15:09 -0600	[thread overview]
Message-ID: <20030319051509.GB9077@wisc.edu> (raw)

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


                 reply	other threads:[~2003-03-19  5:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030319051509.GB9077@wisc.edu \
    --to=tabemann@wisc.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).