Subject: locking of files

From: Oliver Niggemann <[email-masked]>
Date: Tue, 22 Dec 1998 15:27:46 +0100

Hello,

I use CLISP (1998-9-9) under NT 4.0 as an algorithmic backend. The
C++ Frontend (MFC) communicates with CLISP using of a
file-communciation,
i.e. both programms write and read messages to and from the same (!)
file.
It seems as if CLISP does not lock the file, both programms can write
into the file
at the same time. I would also like to prevent concurrent
reading/writing.

Thanks for any help,

    Oliver Niggemann

--
Oliver Niggemann
University of Paderborn
Germany
Room No. E4.164
Tel.: +49 5251 603345
EMail: [email-masked]

---

From: Sam Steingold <[email-masked]>
Date: 22 Dec 1998 12:41:13 -0500

>>>> In message <[email-masked]>
>>>> On the subject of "locking of files"
>>>> Sent on Tue, 22 Dec 1998 06:22:47 -0800 (PST)
>>>> Honorable Oliver Niggemann <[email-masked]> writes:
 >> 
 >> file-communciation, i.e. both programms write and read messages to
 >> and from the same (!)  file.  It seems as if CLISP does not lock the
 >> file, both programms can write into the file at the same time. I
 >> would also like to prevent concurrent reading/writing.

I recommend sockets.
Open a server-socket in C (you can open a server-socket in CLISP on
Unix, I am not sure about w32), then connect to it from CLISP.

w32 file locking sucks big time.  If a program writes to file, nobody
can read from it etc.

PS. A year ago I lived under NT too.  I upgraded to Linux and never
looked back.  This is at work, not at home. :-)

-- 
Sam Steingold (http://www.goems.com/~sds) running RedHat5.2 GNU/Linux
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
OS/2: Why marketing matters more than technology...