mitchellh / go-ps

Find, list, and inspect processes from Go (golang).
MIT License
1.46k stars 250 forks source link

not truncate process name on Mac #7

Open yeonsh opened 8 years ago

yeonsh commented 8 years ago

process_darwin.h changed to use proc_listpids, proc_pidinfo and proc_pidpath.

gabriel commented 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.

gabriel commented 8 years ago

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.)