process.terminate（）不能用于铬/火狐子的工作，如果一个浏览器窗口已经存在 (process.terminate() doesn't work for a chrome / firefox subprocess if a browser window is already present)
I am launching a sub-process using the following command:
I need to kill this process after sometime, so I'm using:
This works only if no instance of the browser is already open. If a browser window is already present, a new window opens but does not terminate after specified time.
I also tried the method given in this question, but that also doesn't work in case of already present window.