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

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow go-daemon

go-daemon Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: 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.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of go-daemon!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Libraries

Registered

2023-01-25