]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testcshared: use fd 100 instead of fd 10 for back-channel communication
authorRuss Cox <rsc@golang.org>
Fri, 4 Dec 2015 20:46:22 +0000 (15:46 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 5 Dec 2015 03:56:23 +0000 (03:56 +0000)
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 <iant@golang.org>
misc/cgo/testcshared/main2.c
misc/cgo/testcshared/src/libgo2/libgo2.go

index 14a8b3f4db7cd8ee972887d5e211643f311f5fee..9752006f79e71fba94cfae856f43d5005d42178e 100644 (file)
@@ -9,7 +9,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#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.
index 636679b978cdccff1167af82473ad1ede9a0c13b..1b69d8f09fa33c8f161037bc9260e10f4cf97463 100644 (file)
@@ -21,7 +21,7 @@ import (
 // that the C code can also use.
 
 const (
-       fd = 10
+       fd = 100
 )
 
 func init() {