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
Earn up to 16% annual interest with Nexo. Icon
Earn up to 16% annual interest with Nexo.

More flexibility. More control.

Generate interest, access liquidity without selling, and execute trades seamlessly. All in one platform. Geographic restrictions, eligibility, and terms apply.
Get started with Nexo.
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