Fix check for init process

PiperOrigin-RevId: 532473530
Change-Id: Ia5f84073e372a63f70425d0fa68ac178019e80be
This commit is contained in:
Wiktor Garbacz 2023-05-16 08:50:32 -07:00 committed by Copybara-Service
parent 340ca4f37a
commit 7ba0a794d1

View File

@ -206,7 +206,7 @@ void MonitorBase::Launch() {
process_ = *std::move(process);
if (process_.main_pid <= 0 || (should_have_init && process_.main_pid <= 0)) {
if (process_.main_pid <= 0 || (should_have_init && process_.init_pid <= 0)) {
SetExitStatusCode(Result::SETUP_ERROR, Result::FAILED_SUBPROCESS);
return;
}