github.com/suiyunonghen/DxCommonLib@v0.5.3/system/redirect_unix.go (about)

     1  // +build linux darwin dragonfly freebsd netbsd openbsd
     2  
     3  package system
     4  
     5  import (
     6  	"os"
     7  	"syscall"
     8  )
     9  
    10  func redirectStdErr(f *os.File) error {
    11  	return syscall.Dup2(int(f.Fd()),int(os.Stderr.Fd()))
    12  }