mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
caf5dd9d5e
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
23 lines
509 B
Go
23 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
|
|
}
|