Quick-and-dirty way to ensure only one instance of a shell script is running at a time

What’s a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time? 41 Answers 41 Use flock(1) to make an exclusive scoped lock a on file descriptor. This way you can even synchronize different parts of the script. #!/bin/bash ( # Wait for lock on /var/lock/.myscript.exclusivelock … Read more

Waiting for another flutter command to release the startup lock

When I run my flutter application it show Waiting for another flutter command to release the startup lock this messages and not proceed further. 34 Answers 34 In my case, following command in Terminal helped (as suggested by Günter): killall -9 dart On Windows (as suggested by upupming): taskkill /F /IM dart.exe

Do I commit the package-lock.json file created by npm 5?

npm 5 was released today and one of the new features include deterministic installs with the creation of a package-lock.json file. Is this file supposed to be kept in source control? I’m assuming it’s similar to yarn.lock and composer.lock, both of which are supposed to be kept in source control. 12 Yes, package-lock.json is intended … Read more