Skip to content

Commit

Permalink
Support path on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed May 23, 2016
1 parent 44bcd9b commit 4602a3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion process_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
)
Expand Down Expand Up @@ -40,7 +41,7 @@ func (p *UnixProcess) Executable() string {

// Path returns path to process executable
func (p *UnixProcess) Path() (string, error) {
return "", fmt.Errorf("Unsupported")
return filepath.EvalSymlinks(fmt.Sprintf("/proc/%d/exe", p.pid))
}

// Refresh reloads all the data associated with this process.
Expand Down

0 comments on commit 4602a3c

Please sign in to comment.