Giter Site home page Giter Site logo

levitation-opensource / singleinstancecmd Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 0.0 33 KB

Tool for ensuring that a process specified in the arguments is launched only one at a time. Similar to the flock tool in Linux.

Home Page: http://www.simplify.ee/

License: Mozilla Public License 2.0

C++ 75.82% C 13.35% Batchfile 10.83%
flock windows exclusive lock process command tool command-line-tool command-line-utility instance

singleinstancecmd's Introduction

SingleInstanceCmd

Tool for ensuring that a process specified in the arguments is launched only one at a time. Similar to the flock tool in Linux.

By default, the SingleInstanceCmd.exe tool creates also a job object, which ensures that when the SingleInstanceCmd.exe tool is killed then the child process and all of its grandchildren descending from it are also killed.

The main use case for this has been launching processes from Task Scheduler. Without this tool there are two issues with Task Scheduler:

  1. When the task is manually ended via Task Scheduler, the process or its descendants was not necessarily all killed. Using a job object solves this.
  2. After the task is manually ended via Task Scheduler or killed via Task Manager, the Task Scheduler may try to start multiple instances of the process concurrently.

State

Ready to use. Maintained and in active use.

Usage

SingleInstanceCmd.exe mutexname [-] cmd [args]
"-" indicates that no job object must be created (descending child processes will live even when SingleInstanceCmd.exe is killed)

See also example.bat for a usage example.

Analytics

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.