Patchwork libgo patch committed: Ignore EINTR in connect

login
register
mail settings
Submitter Ian Taylor
Date March 9, 2011, 6:57 a.m.
Message ID <mcrhbbcpyre.fsf@google.com>
Download mbox | patch
Permalink /patch/86065/
State New
Headers show

Comments

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

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)