新增于: v9.2.0, v8.10.0, v6.13.0
process.ppid
属性返回当前进程的父进程的 PID。
console.log(`The parent process is pid ${process.ppid}`);
Added in: v9.2.0, v8.10.0, v6.13.0
The process.ppid
property returns the PID of the parent of the
current process.
console.log(`The parent process is pid ${process.ppid}`);