]> Cypherpunks repositories - gostls13.git/commit
net: do not use RLock around Accept
authorRuss Cox <rsc@golang.org>
Fri, 8 Feb 2013 03:45:12 +0000 (22:45 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 8 Feb 2013 03:45:12 +0000 (22:45 -0500)
commit18441e8adeab78b32507fefc84be495873928f8c
tree2fdc719dc4d839a6a4a270eff8a4dd64e90d1278
parent3c1dfb2b9a3fb169545bfb40f3febad22063831f
net: do not use RLock around Accept

It might be non-blocking, but it also might be blocking.
Cannot take the chance, as Accept might block indefinitely
and make it impossible to acquire ForkLock exclusively
(during fork+exec).

Fixes #4737.

R=golang-dev, dave, iant, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/7309050
src/pkg/net/fd_unix.go
src/pkg/net/sock_cloexec.go
src/pkg/net/sys_cloexec.go