tailscale/logtail/filch/openfilesync_notdarwin.go
David Crawshaw de94fe0f87 filch: use F_NOCACHE on macOS
For #1320

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2021-02-17 12:18:54 -08:00

17 lines
395 B
Go

// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//+build !darwin
package filch
import (
"os"
)
func openFileSync(path string, flag int, perm os.FileMode) (*os.File, error) {
// TODO(crawshaw): on Linux and FreeBSD, use O_SYNC
return os.OpenFile(path, flag, perm)
}