Subject: fcntl call on win95
From: [email-masked] (Ian Collins)

31 Aug 1997 05:48:51 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
Original-To: "'Gnu win32 mailer'" <[email-masked]>
X-Priority: 3
X-Mailer: Internet Mail Service (5.0.1457.3)
Original-Sender: [email-masked]

I have a routine that write locks a file. The essential code is,

#include <fcntl.h>
auto struct flock lck;
auto int flc;
auto int filedesc;

filedesc = open(filename, O_RDWR|O_CREAT, 0666);
lck.l_type = F_WRLCK;
lck.l_start = 0;
lck.l_whence = 0;
lck.l_len = 0;
flc = fcntl(fildesc, F_SETLK, &lck);

The fcntl provides a write lock on Windows NT fine (on both FAT and
NTFS) filesystems, but fails (flc == -1) on Windows 95.
Can anyone help me on this?

Many Regards,
Ian Collins

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".