aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go
diff options
context:
space:
mode:
authorMatthew Wampler-Doty <matthew.wampler.doty@gmail.com>2015-02-28 05:13:31 +0800
committerMatthew Wampler-Doty <matthew.wampler.doty@gmail.com>2015-02-28 05:13:31 +0800
commit3820a65299831331f215e158d287fe3df3b69ea6 (patch)
treecf7b435109c646aac576ed98eefefb57e1f27223 /Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go
parent8653db6df0018d08212493e3a3df4677162bdd8f (diff)
parent0efd6a881afac0b3082f3b1e8780e3438eea5b02 (diff)
downloadgo-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.gz
go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.tar.zst
go-tangerine-3820a65299831331f215e158d287fe3df3b69ea6.zip
Merge branch 'publictests' of github.com:ebuchman/go-ethereum into ethash_pow
Diffstat (limited to 'Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go')
-rw-r--r--Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go b/Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go
new file mode 100644
index 000000000..655750c54
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/kardianos/osext/osext_plan9.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package osext
+
+import (
+ "os"
+ "strconv"
+ "syscall"
+)
+
+func executable() (string, error) {
+ f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text")
+ if err != nil {
+ return "", err
+ }
+ defer f.Close()
+ return syscall.Fd2path(int(f.Fd()))
+}