GODT-2039: bridge monitors bridge-gui via its PID.

This commit is contained in:
Xavier Michelon
2022-11-08 11:08:11 +01:00
committed by Romain LE JEUNE
parent f5148074fd
commit 3b9a3aaad2
7 changed files with 74 additions and 9 deletions

View File

@ -220,7 +220,12 @@ void launchBridge(QStringList const &args)
else
app().log().debug(QString("Bridge executable path: %1").arg(QDir::toNativeSeparators(bridgeExePath)));
overseer = std::make_unique<Overseer>(new ProcessMonitor(bridgeExePath, QStringList("--grpc") + args, nullptr), nullptr);
qint64 const pid = qApp->applicationPid();
QStringList const params = QStringList { "--grpc", "--parent-pid", QString::number(pid) } + args ;
app().log().info(QString("Launching bridge process with command \"%1\" %2").arg(bridgeExePath, params.join(" ")));
overseer = std::make_unique<Overseer>(new ProcessMonitor(bridgeExePath, params , nullptr), nullptr);
overseer->startWorker(true);
}