SiddiqSoft.DaemonLockfile 1.2.2

NuGet\Install-Package SiddiqSoft.DaemonLockfile -Version 1.2.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package SiddiqSoft.DaemonLockfile --version 1.2.2
<PackageReference Include="SiddiqSoft.DaemonLockfile" Version="1.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SiddiqSoft.DaemonLockfile --version 1.2.2
#r "nuget: SiddiqSoft.DaemonLockfile, 1.2.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install SiddiqSoft.DaemonLockfile as a Cake Addin
#addin nuget:?package=SiddiqSoft.DaemonLockfile&version=1.2.2

// Install SiddiqSoft.DaemonLockfile as a Cake Tool
#tool nuget:?package=SiddiqSoft.DaemonLockfile&version=1.2.2

DaemonLockfile : A simple lockfile implementation for modern C++

CodeQL Build Status


Provide for daemons (applications running as services under docker as an example) to limit themselves to a single instance per "name".


  • C++20
  • Useful for running "daemons" under docker where you may not always have or wish for a true service under the operating system.


  • Use the nuget SiddiqSoft.DaemonLockfile
  • You can also git submodule: git submodule add
  • Copy paste..whatever works.

Example (when using nuget to add the header in the solution)

#include "siddiqsoft/DaemonLockfile.hpp"

// Example daemon host structure
struct MyDaemonType
	siddiqsoft::DaemonLockfile myLockfile{"MyDaemonType", true}; //force acquire

// The "daemon" will hold the lock and when the application exits the lock will be released.
static MyDaemonType daemon;

int main(int argc, char *argv[])
	// Bailout immediately if we do not have a lock--this implies some other instance is running
	if(!daemon.myLockfile.isLocked) return 1;
	// We have the exclusice lock


<small align="right">

© 2021 Siddiq Software LLC. All rights reserved.


Product Versions
native native
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.2 198 7/22/2021
1.2.1-main0001 128 7/22/2021
1.2.0 203 7/15/2021
1.1.0 132 7/15/2021