]> Cypherpunks repositories - gostls13.git/commit
syscall: don't check result of close(fd) in forkAndExecInChild on Plan9
authorDavid du Colombier <0intro@gmail.com>
Tue, 24 Nov 2015 17:54:58 +0000 (18:54 +0100)
committerDavid du Colombier <0intro@gmail.com>
Tue, 24 Nov 2015 18:57:44 +0000 (18:57 +0000)
commit1d3e77607dcc15194f3e772dc5b58980798a6ea5
treeaa9e3c2b067408920885a611623553d64638badc
parenta7383fc4670947ffa513aae4ce2c8917d753da26
syscall: don't check result of close(fd) in forkAndExecInChild on Plan9

On multiprocessor machines, a file descriptor could be
closed twice in forkAndExecInChild. Consequently, the close
syscall returns the "fd out of range or not open" error
and forkAndExecInChild fails.

This changes forkAndExecInChild to ignore the error
returned by close(fd), as on other operating systems.

Fixes #12851.

Change-Id: I96a8463ce6599bfd1362353283e0329a00f738da
Reviewed-on: https://go-review.googlesource.com/17188
Reviewed-by: Rob Pike <r@golang.org>
src/syscall/exec_plan9.go