![]() |
|
#1
|
||||
|
||||
Simple file lock works on unices, not on WindowsI am using a basic file-locking mechanism that works fine on Unix/Linux platform, but fails on Windows 2000 platform. The problem on Windows is that when a process is finished with the data file, it is unable to delete the lock file it created. Apparently, upon closing the lock file, the read-only permission is set for some reason. Some code below (methods inline for simplicity):
CPP / C++ / C Code:
Any help is greatly appreciated. P.S. Thanks to the mod/whoever edited my post. I was just coming back to fix the code tags after finding out the proper tag for C/C++ code. ![]() |
|
#2
|
||||
|
||||
Problem solved.Thanks to anyone who had viewed my posted and devited any time to thinking about my problem. It turns out there was a silly oversight on my part.
I had overlooked the third, optional parameter to the POSIX open function, namely the permissions mode. Apparently, the security policy on Windows NT/2000/XP makes read-only the default mode, while the Unix/Linux test boxes I used did not. The only change required to fix this is in my acquire method: CPP / C++ / C Code:
|
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CD Burner Help - Power Calibration Error.... | JonBoy420 | Computer Hardware Forum | 111 | 17-Apr-2008 15:58 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
| [Tutorial] Standard I/O | aaroncohn | C Programming Language | 20 | 27-Feb-2004 21:07 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The