From: Juergen Pfitzenmaier <pfitzen@informatik.uni-tuebingen.de>
To: caml-list@inria.fr
Subject: Re: mmap for O'Caml
Date: Sat, 11 Dec 1999 01:39:14 +0100 (MET) [thread overview]
Message-ID: <199912110039.BAA21102@sunstroke.informatik.uni-tuebingen.de> (raw)
John Prevost wrote:
> As far as I can tell, there's no way to find out whether a given fd is
> open read only or read-write or even write-only without actually
> trying to read or write it. This means I can't detect at mmap time
> that something's wrong. So my options are:
POSIX has functions stat and fstat. They write info about a file
in a struct stat. One member of the struct is st_mode. You can
use macros like S_IWUSR to check if the owner of the file has
write permission. See man 2 stat for details.
Oooh, this means using C code and not OCaml, but that should be
no problem. You are already using C for your mmap stuff.
I would really like to see some work on using/writing a DB with OCaml
(anyone with an interface for DB/2 out of the box ?) so I look forward
to your project.
pfitzen
next reply other threads:[~1999-12-12 22:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-11 0:39 Juergen Pfitzenmaier [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-12-09 7:07 John Prevost
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=199912110039.BAA21102@sunstroke.informatik.uni-tuebingen.de \
--to=pfitzen@informatik.uni-tuebingen.de \
--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).