]> Cypherpunks repositories - gostls13.git/commit
os: simplify windows Pipe
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 20 Oct 2017 01:44:00 +0000 (12:44 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 21 Oct 2017 00:22:33 +0000 (00:22 +0000)
commit6407b3c80ea7051f01615097afc60da671a688e8
treebda4b66830b66d6ef695e8f1fbab35cfd5096729
parent6db4950dc57deb899bf5550411c01ce32f16bdd0
os: simplify windows Pipe

windows version of Pipe function is implemented by calling
syscall.Pipe which returns handles inheritable by client process,
and then adjusting returned handles with syscall.CloseOnExec.

Just create non-inheritable handles in the first place.
Now that we don't have a race window in the code, drop use
of syscall.ForkLock.

Change-Id: Ie325da7c2397b5995db4a5ddb0117e2ce1745187
Reviewed-on: https://go-review.googlesource.com/72010
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/os/file_windows.go