Skip to content

Commit

Permalink
PluginCheckTask::ProcessFinishedHandler(): warn about exit codes outs…
Browse files Browse the repository at this point in the history
…ide 0..3

in the plugin output as well, in addition to the warning log.
  • Loading branch information
Al2Klimov committed Mar 11, 2024
1 parent 0ecb73b commit 52c6842
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/methods/pluginchecktask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,19 @@ void PluginCheckTask::ProcessFinishedHandler(const Checkable::Ptr& checkable, co
Checkable::CurrentConcurrentChecks.fetch_sub(1);
Checkable::DecreasePendingChecks();

String output = pr.Output;

if (pr.ExitStatus < 0 || pr.ExitStatus > 3) {
Process::Arguments parguments = Process::PrepareCommand(commandLine);
Log(LogWarning, "PluginCheckTask")
<< "Check command for object '" << checkable->GetName() << "' (PID: " << pr.PID
<< ", arguments: " << Process::PrettyPrintArguments(parguments) << ") terminated with exit code "
<< pr.ExitStatus << ", output: " << pr.Output;

output += "<Terminated with exit code " + String(pr.ExitStatus) + ".>";
}

String output = pr.Output.Trim();
output = output.Trim();

std::pair<String, String> co = PluginUtility::ParseCheckOutput(output);
cr->SetCommand(commandLine);
Expand Down

0 comments on commit 52c6842

Please sign in to comment.