x/sys/unix: add Dup2 wrapper for arm64/ppc64
arm64 doesn't have a Dup2 syscall, instead Dup3 is supposed to be used. Since Dup3 is linux-specific, provide a wrapper to make writing portable code easier. Updates golang/go#10235 To verify it, added a testcase for Dup and Dup2. Change-Id: I066bb60d62b2bd64d7ba0fdfbb334ce2213c78e9 Reviewed-on: https://go-review.googlesource.com/20178 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Riku Voipio <riku.voipio@linaro.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment