diff options
author | Sean E. Russell <seanerussell@gmail.com> | 2020-02-13 10:15:52 -0600 |
---|---|---|
committer | Sean E. Russell <seanerussell@gmail.com> | 2020-02-13 10:15:52 -0600 |
commit | 7e5c0c969c223973335c6fae5432411afc3fb060 (patch) | |
tree | 7f785ba4f692b81806209cb5f0c959e86efdba70 /logging | |
parent | 4bfe0251a8893ed08654d59b8a8b8182958e907f (diff) |
Fixes the directory structure.
Diffstat (limited to 'logging')
-rw-r--r-- | logging/logging_arm64.go | 10 | ||||
-rw-r--r-- | logging/logging_other.go | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/logging/logging_arm64.go b/logging/logging_arm64.go new file mode 100644 index 0000000..2b7a25f --- /dev/null +++ b/logging/logging_arm64.go @@ -0,0 +1,10 @@ +package logging + +import ( + "os" + "syscall" +) + +func StderrToLogfile(logfile *os.File) { + syscall.Dup3(int(logfile.Fd()), 2, 0) +} diff --git a/logging/logging_other.go b/logging/logging_other.go new file mode 100644 index 0000000..382baca --- /dev/null +++ b/logging/logging_other.go @@ -0,0 +1,12 @@ +// +build !arm64 + +package logging + +import ( + "os" + "syscall" +) + +func StderrToLogfile(logfile *os.File) { + syscall.Dup2(int(logfile.Fd()), 2) +} |