rclone/lib/daemonize/daemon_other.go
Nick Craig-Wood caf5dd9d5e mount: notice daemon dying much quicker
Before this change we waited until until the timeout to check the
daemon was alive.

Now we check it every 100ms like we do the mount status.

This also fixes compiling on all platforms which was broken by the
previous change

9bfbf2a4a mount: fix macOS not noticing errors with --daemon

See: https://forum.rclone.org/t/rclone-mount-daemon-exits-successfully-even-when-mount-fails/43146
2023-12-01 09:36:05 +00:00

22 lines
509 B
Go

//go:build !unix
// Package daemonize provides daemonization stub for non-Unix platforms.
package daemonize
import (
"fmt"
"os"
"runtime"
)
var errNotSupported = fmt.Errorf("daemon mode is not supported on the %s platform", runtime.GOOS)
// StartDaemon runs background twin of current process.
func StartDaemon(args []string) (*os.Process, error) {
return nil, errNotSupported
}
// Check returns non nil if the daemon process has died
func Check(daemon *os.Process) error {
return errNotSupported
}