Open yeonsh opened 8 years ago
@mitchellh would be great to merge this?
An alternative I was using previously, was parsing ps ax -o pid,comm
which lists the full executable path name, but am trying to avoid that.
In this fork, https://github.com/keybase/go-ps, I added a Path() method to Process which returns the full path to executable.
Supported on windows and darwin. (Uses this patch for darwin.)
process_darwin.h changed to use proc_listpids, proc_pidinfo and proc_pidpath.