javascript - Finding process id of a Node.js server in Windows -


to find process id of node.js server in unix, use below code:

if (process.getgid) {    console.log('current gid: ' + process.getgid()); } 

so output 1888 in *nix os, when execute same in windows os, getting output undefined per node.js docs have explicitly mentioned method won't work in windows.

so question, there anyway can process id in windows os? tried execute taskkill /f /im node.exe kills node processes, want kill particualr process. there anyway achieve this?

on windows process.pid works me.

regarding docs, getgid not returning process id, rather group identity of process, process id use pid

to kill process use:

taskkill /f /pid processid 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -