Questions tagged [lockfile]
106 questions
3
votes
1 answer
RSpec tests failing - Display socket is taken but lock file is missing
I'm trying to run RSpec tests in my Rails application and keep getting the following error:
:> rspec spec/controllers/api/v0/buying_strategies_controller_spec.rb
WARN: Unresolved specs during Gem::Specification.reset:
activemodel (< 6.0,…

allenad3213
- 31
- 1
3
votes
1 answer
Sonarqube: Job fails with Couldn't delete lock file: .././.sonar_lock java.nio.file.NoSuchFileException
I am running command 'gradle sonarqube --stacktrace" which started resulting in the following:
Analysis report generated in /Users/shashank.devan/dev/myproject/build/sonar/batch-report
23:38:14.994 DEBUG - Couldn't delete lock file:…

knash
- 369
- 1
- 4
- 8
3
votes
1 answer
Lockfile in PHP
I have PHP script that should be run only once at the moment. If someone else tries to launch it again while it is already working, the second process should immediately die with error message.
When I try to launch the code below at the second…

Lecko
- 1,275
- 1
- 17
- 32
3
votes
4 answers
What is the best way to lock a file to prevent multiple users from accessing it
I have a windows form app in which users can open, create and save xml files. Files are typically saved to a network folder. I need to make sure a given file can only be opened by one user at a time. The xml file is loaded into a tree control and is…

Dan Schubel
- 279
- 1
- 5
- 14
2
votes
1 answer
yarn.lock file is not updating after I update the version of a dependency in package.json and run yarn install or just yarn
In the repository of a project, I already have package.json and yarn.lock files. I'm updating the version of a particular package from version 2.0.14 to version 2.0.16.
When I do yarn install or just yarn, I can see the changes related to the…

Srinu Rachakonda
- 43
- 1
- 5
2
votes
0 answers
Is there any implementation or how to implement `lockf()` for Windows?
I am porting some Linux code to Windows that uses lockf()
static string load_bulletin_from_file(const char* cache_filename)
{
int fd = open(cache_filename, O_RDWR); // lockf requires O_RDWR
if (fd == -1) {
etiLog.level(error) <<…

Hojzerice
- 35
- 3
2
votes
1 answer
Installation of private npm package from CodeArtifact fails with "401 Unauthorized" with yarn and yarn.lock
We have a private npm package in CodeArtifact that we want to install as part of our package.json.
We are using Yarn as a package manager and have a yarn.lock file to control the versions.
When trying to install with yarn install --frozen-lockfile…

Lola Bach
- 101
- 1
- 3
2
votes
1 answer
devtools::check - System command 'Rcmd.exe' failed, exit stauts:1, stdout + stderr:
I am currently developing a package for my PhD containing functions for the data analysis for my project. The setup is windows 10 and all files are saved locally on the PC and synchronised to One Drive.
I am able to build my package and was also…

ikempf
- 153
- 1
- 10
2
votes
1 answer
renv 0.12.0 was loaded from project library, but renv 0.11.0 is recorded in lockfile
Upon opening a project on rstudio i have the following Warning:
Warning message:
renv 0.12.0 was loaded from project library, but renv 0.11.0 is recorded in lockfile.
Use `renv::record("renv@0.12.0")` to record this version in the lockfile.
Use…

moth
- 1,833
- 12
- 29
2
votes
1 answer
FileHandler creation gives NoSuchFileException cause missing .lck
im searching for 2 hours now fo a solution to this:
Im trying to add a FileHandler to a Logger in a JAR. The Log-Directory is outside.
In my IDE (NetBeans) this works:
public static void addFileHandler(Logger logger) {
try {
Path…

Schesam
- 583
- 5
- 19
2
votes
1 answer
Cross-platform Pipenv.lock
I am creating a cross-platform Python app, using pipenv (as I understand poetry has the same issue too) for management of dependencies and virtual envs.
While trying to build the app on Windows and Linux I noticed that Pipenv.lock is…

Alex P.
- 3,697
- 9
- 45
- 110
2
votes
2 answers
Is lockfile necessary for reading and writing the same file of two processes
I'm working with Bash script and meeting such a situation:
one bash script will write things into a file, and the other bash script will read things from the same file.
In this case, is lockfile necessary? I think I don't need to use lockfile…

Yves
- 11,597
- 17
- 83
- 180
2
votes
3 answers
What is the best exception type to use for an I/O timeout?
I've written a Java class that implements a "lock file" to prevent a period job from running more than once concurrently. It's based upon java.nio.channels.FileChannel.tryLock and works quite well.
My class allows client code to supply a timeout…

Christopher Schultz
- 20,221
- 9
- 60
- 77
2
votes
4 answers
Detecting that files are being copied in a folder
I am running a script which copies one folder from a specific location if it does not exist( or is not consistent). The problems appears when I run concurently the script 2+ times. As the first script is trying to copy the files, the second comes…

John Doe
- 1,058
- 8
- 30
2
votes
0 answers
npm protractor xlsx file wait and retry
I am trying to run protractor with multi capabilities (around 30 browsers with diff versions)
The data sheet is xlsx and is one sheet, which will be consumed. After each run the xlsx row will be updated that it has been 'USED'
I use exceljs to write…

erchristopher
- 53
- 1
- 1
- 5