Questions tagged [lockfile]
106 questions
6
votes
1 answer
Updating an indirect dependency in shrinkwrapped project
Is there a good way with npm (I'm on npm@5) to do a version bump for a nested dependency in a shrinkwrapped/lockfiled project?
Doing an npm install package@latest --save will update the shrinkwrap file as expected, but it also adds the dependency…

Jacob
- 77,566
- 24
- 149
- 228
6
votes
1 answer
In Bash when creating a mutex, should I use `flock` or `mkdir`?
I searched for Bash how to create a mutex. I came across two different ways to create a mutex in Bash. Both are stackoverflow answers and both have >100 upvotes: one answer uses mkdir and the other answer uses flock.
In bash when creating a mutex,…

Trevor Boyd Smith
- 18,164
- 32
- 127
- 177
5
votes
1 answer
How to enforce only one running instance of a process in python Django framework?
I have a python Django manage command that should be called upon receiving an input file but this command is not safe for parallel calls. So an input file should be processed only and only when there is no other file being processed.
One solution…

Ali_IT
- 7,551
- 8
- 28
- 44
5
votes
1 answer
Yarn: use yarn.lock of dependencies
I use yarn to install packages directly from the companies' GitLab:
yarn add git+ssh://@:
For first-level dependencies, I use yarn --pure-lockfile to reconstruct my node_modules according to the yarn.lock.
However, for second level…

user4344
- 193
- 1
- 10
5
votes
1 answer
lockfile-create does not work in bash script
This can be a very simple question but I don't understand why it behaves that way. When I invoke
lockfile-create --use-pid --retry 0 /tmp/my_lock_file
it returns 0, and next time it runs it returns some other code(4) as expected since it has…

Bunti
- 1,730
- 16
- 20
5
votes
2 answers
Get the pid of the shell script and save it into a lockfile
I do my backups with rsnapshot which creates a lockfile with the process pid inside. Now I would like to make a backup from the rsnapshots backup, so I´m looking for a way to create this lockfile for the second/external backup.
The shell script…

user2693017
- 1,750
- 6
- 24
- 50
5
votes
1 answer
Python: Daemonizing process with PID file
I am trying to daemonize a process using the daemon module. Code looks something like this
import sys
import time
import daemon
import lockfile
def do_things():
while True:
print "hello"
time.sleep(3)
def main()
context =…

auny
- 1,920
- 4
- 20
- 37
4
votes
2 answers
How to effectively lock a text file while using it in NodeJS?
I have several independent scripts reading and writing from the same text files. I'm trying to lock the text files while a module is reading/writing from them. At the moment I am using the lockfile package but it does not seem to be working.…

Physicsman
- 171
- 1
- 2
- 9
4
votes
2 answers
I don't understand the results from #service tomcat6 status
I'm trying to get Tomcat 6 running on Fedora 14. I'm quite new to this sort of thing, though I have managed to get Apache running before.
I suspect I've made mistakes on some quite basic levels, because the test page (http://localhost:8080) can't be…

Neil Sands
- 173
- 4
- 18
4
votes
7 answers
memcached dead but subsys locked
service memcached restart yields:
stopping memcached: [failed]
starting memcached: [ ok ]
service memcached status yields:
memcached dead but subsys locked
ls inside /var/lock/subsys/ shows a file named memcached
ls inside /var/run/…

Colin Hilbert
- 69
- 2
- 10
3
votes
1 answer
C++ Lock File Windows Blocking Mode
How can I block a file on Windows using C++ in a blocking fashion? By blocking I mean... a lock is requested and if the file is locked it will wait until it is unlocked, once the file is unlocked by another system process than the execution…

petersaints
- 1,899
- 3
- 18
- 25
3
votes
2 answers
Why does cargo build ignore the lock file when lock changed by git?
I'm confused about the behavior of cargo build when the lock file changes between builds:
Run cargo clean
Run cargo build
Change the lock file to a previous version using git
Now rerun cargo build
In my case, despite the Cargo.lock having changed…

Cornelius Roemer
- 3,772
- 1
- 24
- 55
3
votes
1 answer
How can I optionally add a lockfile to a docker container?
I'm trying to build a docker image that optionally adds a yarn (or npm lockfile) while building. I'd like to add it explicitly, but also not fail the build if it isn't included.
The intent is to respect it if the hosted application uses a…

Dan Monego
- 9,637
- 6
- 37
- 72
3
votes
0 answers
prometheus 2.0.0 error msg="Opening storage failed" err="open DB in /home/prometheus: Lockfile created, but doesn't exist"
Context : Trying to use prometheus on k8s 1.10.2 and using azure file storage as persistent storage medium
Problem : using azurefile storage with prometheus gives me the following error :
level=info ts=2018-06-29T11:08:50.603235475Z…

D007
- 31
- 1
- 4
3
votes
1 answer
How to have yarn fail on yarn install when package.json and yarn.lock are out of sync?
On a project I have replaced npm with yarn to get the benefits of it, and also enforce our dependencies are locked in via the yarn.lock.
Now, a developer added a library with npm@4, which only changed the package.json, and not of course the…

k0pernikus
- 60,309
- 67
- 216
- 347