Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
107 views

The following .NET 8 targetted code (formatted as xunit test) fails on my machine (Windows 11), typically j is something between 50 and 100. [Fact] void FileMoveException() { var sourceFilePath = ...
stb's user avatar
  • 890
2 votes
0 answers
144 views

I'm trying to do an exercise from Advanced Programming in the UNIX Environment where I need to: Open a file that contains a counter. Fork a process. Have the parent and child increment the counter ...
SekstusEmpiryk's user avatar
1 vote
1 answer
76 views

man 2 flock on Linux says: [L1] Locks created by flock() are associated with an open file description (see open(2)). This means that duplicate file descriptors (created by, for ...
Brendan's user avatar
  • 2,522
-1 votes
1 answer
88 views

Current situtation: I am running a docker container on a WAGO PFC200 PLC (custom embedded linux firmware). The container runs a python script which collects systeminfo like cpu load, memory usage etc. ...
Darius's user avatar
  • 1
0 votes
3 answers
189 views

I have these methods to backup my SQLite database and upload it to my blob container: public static async Task<string> CreateBackupAsync() { // Generate the timestamped backup file name ...
federico's user avatar
-1 votes
1 answer
62 views

I have a file that is under lock by the JVM (it is a jar file that provides classes that are loaded at some point during runtime). When my program exits I want to delete this file. However, simply ...
user25626317's user avatar
1 vote
0 answers
298 views

As mentioned elsewhere, Python's FileLocks do not delete themselves after being released on Linux ([1][2]). This fails: import os from filelock import FileLock with FileLock("/tmp/test.lock"...
Ricardo Decal's user avatar
0 votes
2 answers
165 views

I need to write to and read from a config file using shell CGI, and I also have a C program that must read and modify the config file every few seconds. I tried using flock to maintain data integrity ...
Siddu Suhas's user avatar
1 vote
2 answers
92 views

Using powershell, i have this code block ForEach ($Filepath in $BaselineFile_NME,$DailyOutputFile_NME) { $SHA1 = [Security.Cryptography.HashAlgorithm]::Create( "SHA1" ) $stream_HSH = ([IO....
pithhelmet's user avatar
  • 2,312
1 vote
1 answer
1k views

I want to test mandatory locking in linux (Ubuntu 22.04.2 LTS) and I do the following steps 1- mount /dev/vgg1/lvv11 /u03 -o mand 2- chmod g+s /u03/datafile.dbf 3- chmod g-x /u03/datafile.dbf and then ...
tahzibi.jafar's user avatar
0 votes
1 answer
135 views

In Java on Ubuntu, I'm using a FileLock to lock a file. The problem regularly happens on a server that runs on Debian. To make it easily reproducible, I wrote a minimal sample application (see below). ...
delx's user avatar
  • 404
0 votes
1 answer
101 views

Is there a way to use CreateFileW and with FILE_SHARE_WRITE and then after a while change that to only FILE_SHARE_READ? I could not find any documentation, but it seems memory map files can elevate ...
Okoba's user avatar
  • 3
1 vote
1 answer
99 views

I need to lock a file using Java to prevent file deletion by another process, but allow copying of this file. It should be made by two methods like lock() and unlock(). I tried using a FileLock, but ...
Den Didyk's user avatar
0 votes
1 answer
309 views

I was looking for a function to find the username locking a file. I found this one which works fine: Function GetUsername(fileDir As String, fileName As String) As String 'On Error Resume Next Dim ...
Reiler74's user avatar
1 vote
1 answer
223 views

The flag CF_OPEN_FILE_FLAG_FOREGROUND is not documented in either the documentation for CF_OPEN_FILE_FLAGS nor in the documentation for CfOpenFileWithOplock. What is this flag's meaning?
Matt Smith's user avatar
  • 17.5k
0 votes
0 answers
116 views

I need to be able to have multiple processes accessing a single file such that there is at most one writer but potentially multiple readers that have the file open at the same time (enforced at file ...
Michael's user avatar
1 vote
2 answers
746 views

I am debugging an issue with one of our Ignite servers which was running in Kubernetes for some months without issue. Client nodes started failing to come up as as they were failing a readiness probe ...
 RichardFeynman's user avatar
0 votes
1 answer
217 views

I am trying to write a powershell script which open a textfile with an executable like notepad++ and lock the textfile on readmode, so nobody overwrite my changes while I'm working. $lockFile = 'C:\...
StonedLazyDog's user avatar
1 vote
1 answer
442 views

related: Issue on github: https://github.com/broadinstitute/cromwell/issues/7009 I'm using a bioinformatics java program named cromwell (https://github.com/broadinstitute/cromwell/) which, as far as I ...
Pierre's user avatar
  • 35.4k
2 votes
0 answers
157 views

Tl;DR code with FileChannel.tryLock works on a local file but hangs indefinitely when run on a remote machine, I had SSHed into. Most of the length of this question is about showing outputs and ...
lineage's user avatar
  • 920
0 votes
1 answer
116 views

Windows supports LockFile function for applying exclusive locks on a file, and the LockFileEx functions for applying an exclusive locks and shared read for all processes. Is it possible to have ...
Joe's user avatar
  • 215
0 votes
1 answer
1k views

I am getting a data file from source system. once file received in GCP bucket we start processing that file. How to lock this file till the processing is completed? so no other file processor (app) ...
Swapnil Patil's user avatar
0 votes
1 answer
19 views

I was trying to build a simple program that blocks the websites for a given time. The websites are listed in a txt file that I have locked for security reasons. This was my first time experimenting ...
Mynameisaname's user avatar
1 vote
1 answer
782 views

Okay, so I'm unsure how mounts over a network work with file locks. This is the scenario: There are two JVMs, each running on a machine of its own (both Linux). Then there is a file share, on a third ...
habjo's user avatar
  • 29
0 votes
0 answers
207 views

How to acquire lock on a file located at a NAS mount path across multiple JVMs running on different servers in Java/ Spring Boot. Tried FileSystemPersistentAcceptOnceFileListFilter. It picked up the ...
Wonder's user avatar
  • 1
0 votes
1 answer
576 views

I need a very simple persistent storage in my Python application. Usually, I just make a dict and store it with pickle or json when it changes, and then read it back at startup. This only works when ...
jdm's user avatar
  • 10.4k
0 votes
0 answers
372 views

I'm using Windows 7 professional, Visual Studio 2012, and vb.net. This is a legacy program that can't be moved from this machine, so I'm unable to change where it's hosted. I was attempting to read in ...
boilers222's user avatar
  • 2,029
0 votes
0 answers
115 views

After investigating a bug, I found out that when Thread-B calls RandomAccessFile.close on a file (after failing a RandomAccessFile.getChannel().tryLock() call), the closing either closes all open ...
PentaKon's user avatar
  • 4,726
1 vote
1 answer
1k views

Imagine I have two processes trying to open the same file in read only mode. I want only one process to open the file and the other one to fail (essentialy a file lock). What is the difference between ...
ProgramMeALife's user avatar
0 votes
2 answers
2k views

I am using Java's file locking API on a Linux server machine and try to lock a file on a remote Linux NFS system. There are some issues that have popped and logs show that 2 different cluster nodes ...
PentaKon's user avatar
  • 4,726
1 vote
0 answers
356 views

We are using an Enterprise version of TeamCity 2017. We experience an issue that is reproduced like this: Start a build Immediately cancel it Start a build at this point, an exception in TeamCity ...
Oleksandr Novik's user avatar
2 votes
1 answer
1k views

I've got e:\myfile.txt with some random contents: abcabcxyz...abc Then I try to use nio FileLock like below: import java.io.*; import java.nio.channels.*; public class FileLockTest{ public static ...
Troskyvs's user avatar
  • 8,307
0 votes
0 answers
989 views

I am using MoveFileEx() API to move an existing file to a new file. I'm executing below program multiple times via a script. Below program creates a unique file on every execution, and moves it to ...
ganesh nimbolkar's user avatar
0 votes
1 answer
1k views

since this a rather usual Problem, I think I am missing something easy, but: How can I lock a (text) file "fileFrom" in dart, to read the content, write it to another file "fileTo" ...
Haissem55's user avatar
  • 189
1 vote
1 answer
160 views

I'm using Java FileLock to lock files in Clojure (on macOS). This is my code to acquire a lock: (defn lock-file [file-path] (try (let [file (io/file file-path) channel (.getChannel (...
Suvrat Apte's user avatar
-1 votes
2 answers
304 views

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 ...
윤태일's user avatar
  • 567
0 votes
0 answers
504 views

Below is my code to acquire lease on file in azure fileshare. Before acquiring lease, I need to check lease status of file. var shareClient = new ShareClient(connectionString, "testfileshare"...
SnehalPatil's user avatar
1 vote
1 answer
140 views

I made a small script that zips a file and then encrypts that file: #-- cut from proc -- set outfile [open $out wb] set ind [string last \/ $in] set in [string range $in [expr $ind + 1] end] zipfile::...
dana's user avatar
  • 115
0 votes
1 answer
745 views

I tried to lock-unlock file in c. If the file is exist then there is no problem but if file does not exist and file is created, file stays locked. If I tried to open the file, It did not open. It says ...
johnxx987's user avatar
0 votes
0 answers
174 views

I have a bunch of processes accessing and modifying a csv file from Python at the same time (safely doing so with FileLock). I access the file using the Pandas package. I would like to launch another ...
Miguel's user avatar
  • 132
0 votes
0 answers
120 views

I have a PowerShell script that: Starts a new process and redirects the output to two files Waits with a timeout for the process to complete Kills the process if it timed out Reads the contents from ...
Jordan's user avatar
  • 4,670
0 votes
2 answers
2k views

I've been using tldextract for a while in my multiprocess, multithreaded script and it never caused any problems. Now, it's giving me this error message and I've got no idea where to start looking for ...
rudolfovic's user avatar
  • 3,316
0 votes
2 answers
317 views

I'm trying to check the version of the Windows application the user is running against the version that is on the server to see if the local version needs to be updated. I do this by calling ...
John's user avatar
  • 1,338
0 votes
0 answers
312 views

I am running an application in a loop using Process.Start sometimes that application gets stuck (can't modify it) and I shut it down with .Close() if it hasn't update. However, the application creates ...
runfastman's user avatar
0 votes
1 answer
1k views

I want to lock a directory and its contents, to allow only one process writing in it. To do that, I'm using the Portalocker library, and a file called .lock from pathlib import Path import os import ...
David Davó's user avatar
0 votes
0 answers
849 views

I have done a stupid thing and need help getting bailed out. I installed a file/folder lock app "EaseUS LockMyFile" (Windows 11 Home). I locked a couple of folders but wasn't happy with the ...
clg's user avatar
  • 25
3 votes
1 answer
1k views

I usually use git-bash to manage source code from my windows desktop. When I am done, I close the git-bash window or run the exit command. Then, I noticed that a good number of folders used for git ...
tarekahf's user avatar
  • 1,102
0 votes
0 answers
343 views

I'm implementing the multiprocessing, there are lot of JSON files, I want to read and write those files by various processes, I'm doing multiprocessing. I don't want the race condition in between so ...
Akshay Singh's user avatar

1
2 3 4 5
12