onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
242 stars 28 forks source link

NamedLock unable to clear locks under docker. #128

Open bsutton opened 3 years ago

bsutton commented 3 years ago

When using NamedLock in docker, if a dcli app crashes it can leave a stale namedlock.

The named lock logic uses the processes pid to determine if a lock is not stale.

In docker an app will always get the same pid id (1) so it will always look like it is use.

Consider using the processes start time. to help identify the pid is the one we thought it is.