* verifying the recorded PID is still alive.
*/
exec: ISshExec,
logService: ILogService,
serverDataFolderName: string,
quality: string,
): Promise<FindRunningAgentHostResult> {
const stateFile = getAgentHostLockfile(serverDataFolderName, quality);
const { stdout, code } = await exec(`cat ${stateFile} 2>/dev/null`, { ignoreExitCode: true });
if (code !== 0 || !stdout.trim()) {
return { kind: 'notFound' };
}