mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 01:46:31 +02:00
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
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
//go:build windows || plan9 || js
|
||||
// +build windows plan9 js
|
||||
//go:build !unix
|
||||
|
||||
// Package daemonize provides daemonization stub for non-Unix platforms.
|
||||
package daemonize
|
||||
@@ -10,7 +9,14 @@ import (
|
||||
"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, fmt.Errorf("background mode is not supported on %s platform", runtime.GOOS)
|
||||
return nil, errNotSupported
|
||||
}
|
||||
|
||||
// Check returns non nil if the daemon process has died
|
||||
func Check(daemon *os.Process) error {
|
||||
return errNotSupported
|
||||
}
|
||||
|
Reference in New Issue
Block a user