Giter Site home page Giter Site logo

Comments (4)

ngoonee avatar ngoonee commented on August 21, 2024

I just was testing and saw this behaviour, I was under the impression this is what the pidfile is meant to address (but it never gets created in my case).

from dvcs-autosync.

rmayr avatar rmayr commented on August 21, 2024

Writing pid file with default name derived from config file and preventing duplicate startup with same pid file implemented in commit d85965a

from dvcs-autosync.

Dieterbe avatar Dieterbe commented on August 21, 2024
  1. this is a violation of the xdg basedir spec.
    pid files do not belong in directories for configuration.
    instead of merely taking the filename of the config file and appending .pid, I propose:
  • make user configure a directory where all pidfiles will go (maybe default to $XDG_CACHE_HOME/dvcs-autosync)
  • store pidfiles in that directory, using the basename of the config (stripped of any extensions) as basename for the pidfile.

So,
/home/dieter/.config/dvcs-autosync/somedirectory.conf
would give:
/home/dieter/.cache/dvcs-autosync/somedirectory.pid

  1. there should be a way to make autosync either:
  • just kill another autosync instance which is using the same config
  • kill another autosync instance which is using the same config, and replace it.

currently autosync-xdg-launcher.sh implements this in bash by inspecting the arguments of running autosync instances, but implementing it in the python code itself would be more robust, and more useful (for other use cases, like a user manually killing specific autosync instances)

from dvcs-autosync.

rmayr avatar rmayr commented on August 21, 2024

To really fix this issue, it would need to be handled on all platforms, and I don't yet know how to do that without yet another platform dependent piece of code. Are you aware of a standard module that would allow to handle PID-style locking on all platforms?

from dvcs-autosync.

Related Issues (17)

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.