aboutsummaryrefslogtreecommitdiff
path: root/src/os/executable_procfs.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-06-16 18:13:13 -0700
committerIan Lance Taylor <iant@golang.org>2017-06-17 03:32:59 +0000
commitc60d6c0b4367c047470ddd652f8c53e286481f96 (patch)
tree1e80aac590397711a98e12813ce40ff6fcbf07d3 /src/os/executable_procfs.go
parentfddc598370255d64165cea947a59df5e7123f435 (diff)
downloadgo-c60d6c0b4367c047470ddd652f8c53e286481f96.tar.xz
os: on OpenBSD implement Executable using Args[0]
OpenBSD no longer has procfs. Based on a patch by Matthieu Sarter. Fixes #19453. Change-Id: Ia09d16f8a1cbef2f8cc1c5f49e9c61ec7d026a40 Reviewed-on: https://go-review.googlesource.com/46004 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/os/executable_procfs.go')
-rw-r--r--src/os/executable_procfs.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/os/executable_procfs.go b/src/os/executable_procfs.go
index 69a70e18df..b5fae59046 100644
--- a/src/os/executable_procfs.go
+++ b/src/os/executable_procfs.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux netbsd openbsd dragonfly nacl
+// +build linux netbsd dragonfly nacl
package os
@@ -23,8 +23,6 @@ var executablePath, executablePathErr = func() (string, error) {
procfn = "/proc/self/exe"
case "netbsd":
procfn = "/proc/curproc/exe"
- case "openbsd":
- procfn = "/proc/curproc/file"
case "dragonfly":
procfn = "/proc/curproc/file"
}