Library for writing system daemons in Go. Now supported only UNIX-based OS (Windows is not supported). But the library was tested only on Linux and OSX, so if you have the ability to test the library on other platforms, give me feedback, please (#26). We can not use fork syscall in Golang's runtime, because child process doesn't inherit threads and goroutines in that case. The library uses a simple trick: it runs its own copy with a mark - a predefined environment variable. Availability of the variable for the process means execution in the child's copy. So that if the mark is not set - the library executes the parent's operations and runs its own copy with the mark, and if the mark is set - the library executes the child's operations.
Features
- Goroutine-safe daemonization
- Out of box work with pid-files
- Easy handling of system signals
- The control of a daemon
- Now supported only UNIX-based OS
- Library for writing system daemons in Go
Categories
LibrariesLicense
MIT LicenseFollow go-daemon
Other Useful Business Software
Gen AI apps are built with MongoDB Atlas
MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of go-daemon!