-
Notifications
You must be signed in to change notification settings - Fork 0
fix(OSQUERY-004): 2 review findings in process.cpp #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,8 +186,8 @@ std::shared_ptr<PlatformProcess> 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<PlatformProcess>(); | ||
| } | ||
|
|
@@ -233,8 +233,8 @@ std::shared_ptr<PlatformProcess> PlatformProcess::launchTestPythonScript( | |
| std::string args = boost::algorithm::join(args_array, " "); | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π std::cerr used for diagnostic output in launchTestPythonScript In launchTestPythonScript() (osquery/process/posix/process.cpp), replaced π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
|
|
||
| // 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> PlatformProcess::launchTestPythonScript( | |
| return process; | ||
| } | ||
| } // namespace osquery | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π std::cerr used for diagnostic output instead of LOG() macros in process.cpp
In launchExtension() (osquery/process/posix/process.cpp), replaced
std::cerr << "Could not start extension process: " << exec_path << ", error: " << errno << std::endl;withLOG(ERROR) << "Could not start extension process: " << exec_path << ", error: " << errno;, matching the existing LOG(ERROR) style used in launchWorker(). No other logic changed.π€ Prompt for AI agents
fix confidence: π’ 90 high β react π/π to teach the reviewer