0

我有一个 python 模块,可以在 ubuntu 中通过 opencv 与网络摄像头一起使用。我应该从 nodejs 执行它,所以我使用 shelljs 包并运行shell.exec('sudo pkill -P ${pythonProcess.pid}'). 它不会关闭网络摄像头,否则它会在 ubuntu 的终端中工作。我输入sudo pkill -P <PID>终端并终止进程并立即关闭网络摄像头。有人知道为什么吗?tnx。

4

0 回答 0