This is the mail archive of the
cygwin
mailing list for the Cygwin project.
file locking behaviour
- From: "Damjan Lango" <damjan dot lango at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 8 Oct 2007 23:37:16 +0200
- Subject: file locking behaviour
- References: <21e1598b0710081432g3cedf377wbb69d023cf08bb22@mail.gmail.com>
Hello!
I have a program that uses:
lock.l_type = F_WRLCK;
fcntl(log->handle, F_SETLK, &lock)
the file is then locked also for reads, is that correct behaviour?
I thought that only writing would be locked.
on unix the file stays readable even if using the above code.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/