Git Product home page Git Product logo

Comments (4)

mutability avatar mutability commented on July 2, 2024

It looks like lockfile is fundamentally broken. It assumes that tcl's "file rename" without -force is atomic, i.e. it will either rename the file without clobbering, or fail.

This is not true. It first checks if the target exists. If the target does not exist, then it does a rename() call, which atomically replaces the target if it exists. There is a window between the test and the rename where another process could create the lockfile.

I'd suggest just using TclX's "flock" (open the lockfile in a+ mode, try to flock -nowait, keep the lockfile open until you want to release the lock)

from speedtables.

mutability avatar mutability commented on July 2, 2024

or you could probably do something with opening the lockfile with flags CREAT EXCL

from speedtables.

resuna avatar resuna commented on July 2, 2024

I've created a "locking" branch off "stapi-test" to work on this. Creating the lockfile directly creates a potential race condition where the lockfile is created but the PID of the opener hasn't been put into it. I think I've handled that. Can you give it a try?

from speedtables.

bovine avatar bovine commented on July 2, 2024

Fixed in 1.6.4 release.

from speedtables.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.