]> Cypherpunks repositories - gostls13.git/commit
syscall: fix duplicate fd bug for Plan 9
authorAkshat Kumar <seed@mail.nanosouffle.net>
Tue, 17 Apr 2012 00:35:15 +0000 (17:35 -0700)
committerAnthony Martin <ality@pbrane.org>
Tue, 17 Apr 2012 00:35:15 +0000 (17:35 -0700)
commit4cf577edf98fbb642840b55b474d9fd19b2f6606
tree045996ea7817386a48e254f2497a8d5f853dde96
parentbd7c4aee96b5256d59a9805a2bfbb2d6394df9ff
syscall: fix duplicate fd bug for Plan 9

This change comes from CL 5536043,
created by Andrey Mirtchovski. His
description follows:

"The plan9 exec child handler does not manage
dup-ed fds from the parent correctly: when a
dup-ed file descriptor appears in the child's fd
list it is closed when first encountered and then
subsequent attempt to dup it later in Pass 2 fails,
resulting in 'fork/exec: fd out of range or not
open'."

R=golang-dev, rminnich, ality
CC=golang-dev, mirtchovski, rsc
https://golang.org/cl/6009046
src/pkg/syscall/exec_plan9.go