[M3devel] opening files under Win32

Mika Nystrom mika at async.caltech.edu
Tue Nov 13 21:41:40 CET 2007


Hello again everyone,

This may be a silly question, but does anyone out there in Modula-3-land
know how to get more "Unix-like" semantics in opening files on
Windows?  I am using an old version of Modula-3 under "NT386GNU"/Cygwin
and I'd like to open a file (for reading only) while another process
has it open for writing (via FileWr.Open).  Ideally, the method
wouldn't change the writer at all, because I kind of like the fact
that I have exclusive write access to the file (which avoids having
to do all kinds of other external locking that is necessary when
running the same program on Unix).  I know what I'm trying to do
is possible, because the Cygwin tools (like less, cp, etc.) can
read the contents of the file, no problem, but when I try to open
it with FileRd.Open, it doesn't work...

     Mika



More information about the M3devel mailing list