我正在尝试执行一个webpack开发服务器。启动服务器后,我需要服务器的pid。
这就是我所拥有的,但是我获得的pid与webpack开发服务器的pid不对应。我需要该pid才能直接对应于我在端口5000上运行的webpack开发服务器。
x = child_process.exec("npm run webpack-dev-server");```
I expect the pid to be of the webpack dev server (I find the pid by using `lsof -i tcp:5000`), but it isn't of the webpack dev server.