Files
openchamber-android-native/third_party/mygo/internal/mobile/dup_android.go
T

12 lines
277 B
Go
Raw Normal View History

package mobile
import (
"os"
"syscall"
)
// dupOutput makes the descriptor of old (standard output or error) write
// to w, for the runtime's own writes (panics) to go there too.
func dupOutput(w, old *os.File) error {
return syscall.Dup3(int(w.Fd()), int(old.Fd()), 0)
}