From: Ian AT kiwiplan DOT co DOT nz (Ian Collins) Subject: FW: fcntl call on win95 31 Aug 1997 06:59:48 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <07551A47EAD6D01186430060B025C6F40A6C9C.cygnus.gnu-win32@modem1.kiwiplan2.co.nz> Mime-Version: 1.0 Content-Type: text/plain Original-To: "'Gnu win32 mailer'" X-Priority: 3 X-Mailer: Internet Mail Service (5.0.1457.3) Original-Sender: owner-gnu-win32 AT cygnus DOT com Many Regards, Ian Collins > -----Original Message----- > From: Ian Collins > Sent: Thursday, August 28, 1997 12:26 PM > To: 'Gnu win32 mailer' > Subject: fcntl call on win95 > > I have a routine that write locks a file. The essential code is, > > #include > 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 AT cygnus DOT com" with one line of text: "help".