From: assini AT kamus DOT it (Pasqualino Assini) Subject: Bug report: flock 22 Feb 1997 17:06:50 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <330F718C.78C6.cygnus.gnu-win32@kamus.it> Reply-To: assini AT kamus DOT it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com It appears that there is some problem with flock in beta 17.1 under Windows 3.51 and Windows 95 I use flock to get an exclusive lock by using the routine listed at the end of the message. While it seems to work perfectly under my WinNT 4.0 workstation a client told me that the lock is not granted under WinNT 3.51 server and Win95. It also doesn't work on any platform with beta 16.1 (but that's quite normal as I think that flock support wasn't there at the time!) Did anyone else experiment with flock support ? int lock_open(const char* filename ,int timeout ,int flags ) { int fid; TRACE2("Trying to get lock on file %s",filename); fid=open(filename, flags, S_IREAD|S_IWRITE); if (fid == -1) return(-1); struct flock cntrl; cntrl.l_type=F_WRLCK; // exclusive lock int error; int elapsed=0; while ( (error=fcntl(fid,F_SETLK,&cntrl)) && (elapsed