]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: drop fallback to pipe in Pipe on linux/arm
authorTobias Klauser <tklauser@distanz.ch>
Wed, 8 Sep 2021 08:41:56 +0000 (10:41 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Thu, 9 Sep 2021 04:47:41 +0000 (04:47 +0000)
Follow-up for CL 346789

The minimum required Linux kernel version for Go 1.18 will be changed to
2.6.32, see #45964. The pipe2 syscall was added in 2.6.27, so the
fallback to use pipe in Pipe on linux/arm can be removed.

For #45964

Change-Id: I8b18244ca1f849f10e90565b4fef80ce777fef69
Reviewed-on: https://go-review.googlesource.com/c/go/+/347349
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/syscall/syscall_linux_arm.go

index e887cf788f3ae20cab1ee83a502ff054f1383d97..fffa4b29b96ff89ce844343dd8fc029cde45dc98 100644 (file)
@@ -29,11 +29,7 @@ func Pipe(p []int) (err error) {
                return EINVAL
        }
        var pp [2]_C_int
-       // Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
        err = pipe2(&pp, 0)
-       if err == ENOSYS {
-               err = pipe(&pp)
-       }
        p[0] = int(pp[0])
        p[1] = int(pp[1])
        return