From 1c32ed546169e669f6098db9368f494ea218cbf5 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 05:24:17 +0000 Subject: [PATCH] fix(OSQUERY-004): 2 review findings in process.cpp --- osquery/process/posix/process.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osquery/process/posix/process.cpp b/osquery/process/posix/process.cpp index 270ea2ddd66..119fbd62f79 100644 --- a/osquery/process/posix/process.cpp +++ b/osquery/process/posix/process.cpp @@ -186,8 +186,8 @@ std::shared_ptr PlatformProcess::launchExtension( ::execve(arguments[0], argv, ::environ); // Code should never reach this point - std::cerr << "Could not start extension process: " << exec_path - << ", error: " << errno << std::endl; + LOG(ERROR) << "Could not start extension process: " << exec_path + << ", error: " << errno; ::exit(EXIT_FAILURE); return std::shared_ptr(); } @@ -233,8 +233,8 @@ std::shared_ptr PlatformProcess::launchTestPythonScript( std::string args = boost::algorithm::join(args_array, " "); // Should not reach this if everything executes correctly - std::cerr << "Could not start process at " << osquery_python_path - << ", args: " << args << ", error: " << errno << std::endl; + LOG(ERROR) << "Could not start process at " << osquery_python_path + << ", args: " << args << ", error: " << errno; ::exit(EXIT_FAILURE); } else if (process_pid > 0) { process.reset(new PlatformProcess(process_pid)); @@ -243,3 +243,4 @@ std::shared_ptr PlatformProcess::launchTestPythonScript( return process; } } // namespace osquery +