github.com/neugram/ng@v0.0.0-20180309130942-d472ff93d872/eval/shell/exec_procfs.go (about) 1 // Copyright 2016 The Neugram Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build linux 6 7 package shell 8 9 import ( 10 "os" 11 ) 12 13 // executable returns the path to the executable of this process. 14 func executable() (string, error) { 15 // TODO: handle " (deleted)" 16 return os.Readlink("/proc/self/exe") 17 }