The concept of locking a file to serialize concurrent accesses to said file.
Questions tagged [file-locking]
372 questions
0
votes
1 answer
Accessing a file already in use
Possible Duplicate:
Read file which is in use?
I am trying to access a file that is already in use in Windows 7. I have tried all the suggestions I could find on this site and other but no success yet.
What I have tried:
FileStream fs = new…

lakedoo
- 385
- 1
- 4
- 13
0
votes
1 answer
Insane increase of Nonpaged Kernel Memory when running this Java app
I've made a packet sniffer using JNetPcap library. It's a .jar that is executed from another application that monitors the system resources (RAM, Disk usage, active network interfaces, running processes, etc). I want the sniffer to close itself when…

Hernán Erasmo
- 371
- 5
- 15
0
votes
2 answers
C# text file sharing scheme for multiple users
Instead of me writing from scratch a text file sharing windows form application, I thought I would simply ask if someone has a snippet (C#) or methodology that I could use?
The application merely needs to create a text file and allow multiple users…

dellbingham
- 59
- 1
- 5
0
votes
1 answer
filelock allows opening of files
i executed the following c code on my ubuntu machine...i have read about fcntl()'s use to lock a file and even reading will not be allowed if F_WRLCK opton is set...so i started this program and before relinquishing the lock by pressing enter i…

AvinashK
- 3,309
- 8
- 43
- 94
0
votes
2 answers
Is there any reason to use locks files over flock?
With lock files I mean: Create a file to lock a resource and delete it when releasing it again.

Ynv
- 1,824
- 3
- 20
- 29
-1
votes
2 answers
Characters added to the bottom of .yaml files accessed by multiple processes
I make a YAML file as a configuration file and read and write python code through the YAML library.
However, this YAML file is read and written by multiple processes, but sometimes the file is corrupted and an error occurs.
As shown below, one…

윤태일
- 537
- 1
- 9
- 21
-1
votes
1 answer
Java file lock for read and write with multiple processes
In my application multiple processes are trying access a file for read and write. Every application has a single thread. I need to make sure that no 2 processes are accessing the file at the same time. I am using FileLock in JDK. This works fine,…

Bagira
- 2,149
- 4
- 26
- 55
-1
votes
1 answer
I cannot delete a just created textfile
When I create a textfile, next copy it to another directory and then try to delete the original, it won't work, because the programa keeps the file locked.
Before deleting the file, I set the file-attribute to 'normal'like…

I.Hirs
- 1
- 1
-1
votes
1 answer
How to Prevent Deletion of a Locked File in C#
How can i prevent deletion of a file from temp folder created in AppDomain.CurrentDomain of my solution which is currently in open state..
I want to delete unused files only..
i tried with this..
public void TempDocumentDeletion()
{
string…

AJITH CHANDRAN
- 19
- 5
-2
votes
1 answer
Read lock on file failed with error number EBADF
I was trying to write a test program to test if file locking works correctly. But, one of the tests is getting failed. I am trying to acquire a read lock on a file, but the test failed. When I tried to print the error number, it printed 9 which…

kiner_shah
- 3,939
- 7
- 23
- 37
-2
votes
1 answer
lock text files with passwords
Is there any way to protect the text file. I want to protect my text files to protect with password. So how is it possible that when client wants to open the text file it asks for password and files can be opened in notepad only after entering the…

adesh
- 1,157
- 3
- 18
- 28
-4
votes
1 answer
segmentation err in switch case
I wrote a code to implement file locking in c. After resolving a errors and ignoring all the warnings haha, I was able to compile the code but now the thing is, When I try to add content to the file, it is showing segmentation error. code…