RDKEMW-10995: Added proper fd validation#406
RDKEMW-10995: Added proper fd validation#406ks734 wants to merge 8 commits intordkcentral:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses file descriptor validation issues in the FileSink class to prevent double-close errors and invalid file descriptor usage. The changes add proper validation before close operations and improve error handling when write operations fail.
Changes:
- Modified destructor to check if mOutputFileFd is different from mDevNullFd before closing to avoid double-close
- Added fd validation before write operations in DumpLog method
- Added error handling for EBADF and EPIPE errors with fallback to /dev/null
- Added fd validation before writing debug markers
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Added proper fd validation and avoids closing the same fd twice
Test Procedure
How to test this PR (if applicable)
Type of Change
Requires Bitbake Recipe changes?
meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updatingSRC_REV)