mitchellh / go-ps

Find, list, and inspect processes from Go (golang).
https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
MIT License
1.47k stars 251 forks source link

WSL: Show native Windows processes #50

Open mcandre opened 3 years ago

mcandre commented 3 years ago

I have a need to show the complete list of processes, so that Go code running inside Windows Subsystem for Linux reports not only the Linux processes, but the native Windows processes as well. Could we please expand the list?

For example, detect when the environment is WSL. Then run /mnt/c/Windows/System32/tasklist.exe and parse the results.