DamonOehlman / procinfo

Simple Process Information Helpers for Node
1 stars 1 forks source link

Cross-Platform Support #2

Open mjhasbach opened 10 years ago

mjhasbach commented 10 years ago

This NPM module looks very nice, and I wanted to use it, but noticed that it requires ps, a UNIX-only command. As I have a Windows dev environment, I was excluded from this module. Please add Windows support or add to the readme that this module is intended for UNIX-only.

DamonOehlman commented 10 years ago

It does kind of say in the readme that it is *nix only at this stage, though I'm not against adding Windows support.

What are the tools in a windows environment that do a similar job to ps? While not on a Windows platform now I remember using PsTools years ago...

mjhasbach commented 10 years ago

I do see the *nix comment now, sorry about that (tired typing). I also see that several similar plugins are UNIX-only as well, using the ps command.

The Windows equivalent is of ps is tasklist, but I haven't seen that used yet in a module. Node-wintools uses wmic process list /format:csv to return a list of all running Windows processes.

mjhasbach commented 10 years ago

After some more research, tasklist seems like the better way. There do not appear to be any tasklist libraries on NPM, so I'm going to make one and that will help with adding Windows support here.

DamonOehlman commented 10 years ago

Sounds good :)

mjhasbach commented 10 years ago

Here is my module for Windows' tasklist and taskkill in Node.js. I forked this repo with the intent of adding Windows support today, but I'm having a real hard time getting a Linux image for compatibility testing on my current spotty internet connection.

I'll add Windows support for procinfo within the next few days if you or someone else doesn't beat me to it :)

I also think it would be cool to be able to kill a process via procinfo (though this may be considered outside of its scope).

DamonOehlman commented 10 years ago

Awesome, I think I can definitely add support for windows given what you have done in your module. Additionally, I do have a windows machine kicking around so I can test to make sure procinfo works on both platforms.

mjhasbach commented 10 years ago

Thanks! I look forward to seeing it.