]> Cypherpunks.ru repositories - gostls13.git/commit
misc/ios: fix exec wrapper locking
authorElias Naur <elias.naur@gmail.com>
Fri, 25 Mar 2016 14:40:44 +0000 (15:40 +0100)
committerElias Naur <elias.naur@gmail.com>
Fri, 25 Mar 2016 16:47:01 +0000 (16:47 +0000)
commit1664ff96f76e4f2cfdbaabfe286cdeff0426a013
treef480531b3c0a57772ff65d5b759fd27e157c810d
parent4d920410d2a61b9df697337faff3944834b55162
misc/ios: fix exec wrapper locking

The exec wrapper lock file was opened, locked and then never used
again, assuming it would close and unlock at process exit.
However, the garbage collector could collect and run the *os.File
finalizer that closes the file prematurely, rendering the lock
ineffective.

Make the lock global so that the lock is live during the entire
execution.

(Hopefully) fix the iOS builders.

Change-Id: I62429e92042a0a49c4f1ea553fdb32b6ea53a43e
Reviewed-on: https://go-review.googlesource.com/21137
Reviewed-by: David Crawshaw <crawshaw@golang.org>
misc/ios/go_darwin_arm_exec.go