2023-11-29 23:11:11 +08:00
|
|
|
//go:build !unix
|
2021-08-18 19:07:09 +08:00
|
|
|
|
2022-08-28 19:21:57 +08:00
|
|
|
// Package daemonize provides daemonization stub for non-Unix platforms.
|
2021-08-18 19:07:09 +08:00
|
|
|
package daemonize
|
|
|
|
|
|
|
|
import (
|
2021-11-04 18:12:57 +08:00
|
|
|
"fmt"
|
2021-08-18 19:07:09 +08:00
|
|
|
"os"
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
2023-11-29 23:11:11 +08:00
|
|
|
var errNotSupported = fmt.Errorf("daemon mode is not supported on the %s platform", runtime.GOOS)
|
|
|
|
|
2021-08-18 19:07:09 +08:00
|
|
|
// StartDaemon runs background twin of current process.
|
|
|
|
func StartDaemon(args []string) (*os.Process, error) {
|
2023-11-29 23:11:11 +08:00
|
|
|
return nil, errNotSupported
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check returns non nil if the daemon process has died
|
|
|
|
func Check(daemon *os.Process) error {
|
|
|
|
return errNotSupported
|
2021-08-18 19:07:09 +08:00
|
|
|
}
|