fix: 修复 arm 服务器打包失败的问题

This commit is contained in:
wanghe-fit2cloud 2023-03-07 21:45:20 +08:00
parent 5c84277f12
commit e88437e7cd

View File

@ -99,7 +99,7 @@ func NewWriterFromConfig(c *Config) (RollingWriter, error) {
stdErrFileHandler = file
if runtime.GOOS != "windows" {
if err = syscall.Dup2(int(file.Fd()), int(os.Stderr.Fd())); err != nil {
if err = syscall.Dup3(int(file.Fd()), int(os.Stderr.Fd()), 0); err != nil {
return nil, err
}
runtime.SetFinalizer(stdErrFileHandler, func(fd *os.File) {