0
所以我在我的NodeJs應用程序中有一個子進程數組。現在我有Node.js子進程,訪問事件句柄中的進程對象?
cp_array[i].process.on("exit",exithandle(code,signal));
對他們每個人。 問題是我想能夠訪問exithandle中退出的進程的進程對象。所以如果我把cp_array [i] .process.name =「example」放在exithandle函數中,我可以通過process.name訪問我的「example」字符串。