libgo patch committed: Ignore EINTR in connect

Submitted by Ian Taylor on March 9, 2011, 6:57 a.m.

Details

Message ID mcrhbbcpyre.fsf@google.com
State New
Headers show

Commit Message

Ian Taylor March 9, 2011, 6:57 a.m.
This libgo patch ignores an EINTR which occurs while calling connect on
a socket.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

This is for PR 48019.

Ian

Patch hide | download patch | download mbox

diff -r eb43a92af99e libgo/go/net/sock.go
--- a/libgo/go/net/sock.go	Tue Mar 08 22:31:00 2011 -0800
+++ b/libgo/go/net/sock.go	Tue Mar 08 22:45:17 2011 -0800
@@ -54,6 +54,9 @@ 
 
 	if ra != nil {
 		e = syscall.Connect(s, ra)
+		for e == syscall.EINTR {
+			e = syscall.Connect(s, ra)
+		}
 		if e != 0 {
 			closesocket(s)
 			return nil, os.Errno(e)