Chromium Embedded如何检测我们是否作为子流程运行

How in Chromium Embedded detect if we are running as subprocess?

本文关键字:运行 程运行 我们 Embedded 何检测 Chromium 检测 是否      更新时间:2023-10-16

当Chromium Embedded Framework 3子流程使用单个可执行文件时,程序如何检测它是作为主可执行文件还是作为子流程运行?

我发现主进程使用命令行开关--type=zygote运行,但子进程不是。

(用伪语言):总是正确的吗

if (command line switch --type=zygote not found) {
    we are in subprocess
}

是的,我相信是的,我们成功地使用了这种技术。

          if ( wcsstr(lpCmdLine, L"type") == NULL ){
             //  we have no subprocess type so we are the main process
          }