[Bug 1142] ms office2k file lock
wine-bugs at winehq.org
Tue Oct 12 12:10:38 CDT 2004
------- Additional Comments From wine at deesconsulting.com 2004-12-10 12:10 -------
Upon further investigation, this is what I have found:
The main function for opening/creating files in Windows is NtCreateFile().
This function calls SERVER_START_REQ( create_file ) which tells the wine
server to open/create a file.
The function DECL_HANDLER(create_file) handles this request in the wine server
by calling the create_file() function.
create_file() calls open_fd().
open_fd() calls check_sharing().
check_sharing() seems to be the broken function in question. From a cursory
investigation, this function seems to only check for cached file locks within
the wine environment. check_sharing() does not call fcntl() to check for
filesystem locks in Linux. Thus, locks set by the wine server with lock_fd()
upon calling NtLockFile() are not checked upon file open.
Based on my previous post, I'm assuming that Windows normally enforces
mandatory file locking upon opening a file with NtCreateFile(). This
assumption could be wrong, but it explains the behaviour seen and seems to be
Now the question becomes "what error/status should the wine server return to
the program upon opening a locked file?"
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs