本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
685B

  1. // Copyright 2015 Daniel Theophanes.
  2. // Use of this source code is governed by a zlib-style
  3. // license that can be found in the LICENSE file.package service
  4. // Package minwinsvc is a minimal non-invasive windows only service stub.
  5. //
  6. // Import to allow running as a windows service.
  7. // import _ "github.com/kardianos/minwinsvc"
  8. // This will detect if running as a windows service
  9. // and install required callbacks for windows.
  10. package minwinsvc
  11. // SetOnExit sets the function to be called when the windows service
  12. // requests an exit. If this is not called, or if it is called where
  13. // f == nil, then it defaults to calling "os.Exit(0)".
  14. func SetOnExit(f func()) {
  15. setOnExit(f)
  16. }
上海开阖软件有限公司 沪ICP备12045867号-1