"Fossies" - the Fresh Open Source Software Archive

Member "gitea-1.7.6/modules/minwinsvc/README.md" (13 Apr 2019, 388 Bytes) of package /linux/misc/gitea-1.7.6.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Minimal windows service stub

Programs designed to run from most *nix style operating systems can import this package to enable running programs as services without modifying them.

import _ "github.com/kardianos/minwinsvc"

If you need more control over the exit behavior, set

minwinsvc.SetOnExit(func() {
    // Do something.
    // Within 10 seconds call: