]> Cypherpunks repositories - gostls13.git/commit
os: don't hold ForkLock across opens on Plan 9
authorAkshat Kumar <seed@mail.nanosouffle.net>
Wed, 30 Jan 2013 17:41:16 +0000 (09:41 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 30 Jan 2013 17:41:16 +0000 (09:41 -0800)
commitfb451490ec646dba0d8fe9c6d0291c40e7631533
tree7a7b3d3df66c9f99c5249ce4b0e7883f3d7a4a61
parentad341843a7661e4883c8a66b12433e55db1dfc7e
os: don't hold ForkLock across opens on Plan 9

If os.OpenFile holds ForkLock on files that block opens,
then threads that simultaneously try to do fork-exec will
get hung up (until the open succeeds). Blocked opens are
common enough on Plan 9 that protecting against fd leaks
into fork-execs means not being able to do fork-execs
properly in the general case. Thus, we forgo taking the
lock.

R=rsc, ality
CC=golang-dev
https://golang.org/cl/7235066
src/pkg/os/file_plan9.go