我编写了一个node-webkit应用程序,它不会创建子进程。然后我运行ps
,但发现了三个node-webkit进程。我想知道哪个是我的应用程序,以及其他两个进程在做什么?我正在使用OSX 10.10。
$ ps aux | grep fbt
laike9m 11622 111.1 1.6 3766608 272416 ?? R 10:37上午 0:09.52 /Applications/fbtmac.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper --type=renderer --no-sandbox --lang=zh-CN --enable-threaded-compositing --nodejs --working-directory=/Applications/fbtmac.app/Contents/Resources/app.nw --node-main=index.js --child-clean-exit --enable-threaded-compositing --disable-accelerated-video-decode --enable-software-compositing --channel=11619.1.128080293
laike9m 11621 4.2 0.5 2800664 90112 ?? S 10:37上午 0:00.97 /Applications/fbtmac.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper --type=gpu-process --channel=11619.0.1688422656 --no-sandbox --supports-dual-gpus=false --gpu-driver-bug-workarounds=10,17,21,23,26,36,42 --disable-accelerated-video-decode --gpu-vendor-id=0x8086 --gpu-device-id=0x0d26 --gpu-driver-vendor --gpu-driver-version
laike9m 11619 3.3 0.2 3023464 40944 ?? U 10:37上午 0:01.62 /Applications/fbtmac.app/Contents/MacOS/node-webkit
答案 0 :(得分:0)
NW继承了Chromium的多进程架构:https://www.chromium.org/developers/design-documents/multi-process-architecture
Node.js在与渲染器进程中的DOM(Web引擎)相同的线程中运行