logging: Use dup(2) syscall on darwin

This commit is contained in:
Nicholas Corin 2021-04-12 08:47:11 +02:00
parent 3d3b7be6db
commit 1e59a0a926
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
// +build !freebsd,arm64
// +build !freebsd,!darwin,arm64
package logging

View File

@ -1,9 +1,11 @@
// +build linux,!arm64 openbsd,!arm64 freebsd darwin,!arm64
// +build linux,!arm64 openbsd,!arm64 freebsd darwin
package logging
import "syscall"
import "os"
import (
"os"
"syscall"
)
func stderrToLogfile(logfile *os.File) {
syscall.Dup2(int(logfile.Fd()), 2)