![](/img/trans.png)
[英]How to get the output of command executed using child_process in nodejs?
[英]Nodejs how to get child process from process Id
嗨,有人知道在節點JS中如何從進程ID中獲取子進程嗎? 像這樣的東西謝謝
var pid="1212";
var process=getprocess(pid)
不幸的是,我沒有為此得到任何Node JS代碼,但是我找到了一個解決方案,方法是通過以下方式將Power Shell腳本作為子進程運行,並通過傳遞進程ID作為參數。
$a=Get-WmiObject win32_process | where {$_.ParentProcessId -eq $processid }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.