Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pretty sure forking a process every line is not the most efficient way to do this :) But nether the less, very cool


This reads more like proof-of-concept. There are already 2 forks on github that use faster ways.


There are more efficient ways, but they are platform specific. Using ps is easier, as it's standard.


Not on my machine. :-)

   C:\>ps
   'ps' is not recognized as an internal or external command,
   operable program or batch file.
The guy why suggested using the psutil is onto something -- definitely a 3rd-party dependency, but rolls all the platform specific messiness into a library. And much faster and less fragile than forking a new process.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: