This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
fcntl call on win95
- To: "'Gnu win32 mailer'" <gnu-win32 at cygnus dot com>
- Subject: fcntl call on win95
- From: Ian Collins <Ian at kiwiplan dot co dot nz>
- Date: Thu, 28 Aug 1997 12:26:19 +1200
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
"gnu-win32-request@cygnus.com" with one line of text: "help".