From: Russ Cox Date: Fri, 4 Dec 2015 20:46:22 +0000 (-0500) Subject: misc/cgo/testcshared: use fd 100 instead of fd 10 for back-channel communication X-Git-Tag: go1.6beta1~186 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b5e2ec8bbe11929a32f621b2bd711a1bea508b8b;p=gostls13.git misc/cgo/testcshared: use fd 100 instead of fd 10 for back-channel communication There is a report that fd 10 is already in use when run on some OS X machines. I don't see how, and I can't reproduce the problem on my own OS X machine, but it's easy enough to fix. Fixes #12161. Change-Id: I73511bdd91258ecda181d60d2829add746d1198b Reviewed-on: https://go-review.googlesource.com/17451 Reviewed-by: Ian Lance Taylor --- diff --git a/misc/cgo/testcshared/main2.c b/misc/cgo/testcshared/main2.c index 14a8b3f4db..9752006f79 100644 --- a/misc/cgo/testcshared/main2.c +++ b/misc/cgo/testcshared/main2.c @@ -9,7 +9,7 @@ #include #include -#define fd (10) +#define fd (100) // Tests libgo2.so, which does not export any functions. // Read a string from the file descriptor and print it. diff --git a/misc/cgo/testcshared/src/libgo2/libgo2.go b/misc/cgo/testcshared/src/libgo2/libgo2.go index 636679b978..1b69d8f09f 100644 --- a/misc/cgo/testcshared/src/libgo2/libgo2.go +++ b/misc/cgo/testcshared/src/libgo2/libgo2.go @@ -21,7 +21,7 @@ import ( // that the C code can also use. const ( - fd = 10 + fd = 100 ) func init() {