Skip to content

stdio/file: fix tmpfile errno setting#476

Open
julianuziemblo wants to merge 1 commit into
masterfrom
julianuziemblo/#1575
Open

stdio/file: fix tmpfile errno setting#476
julianuziemblo wants to merge 1 commit into
masterfrom
julianuziemblo/#1575

Conversation

@julianuziemblo
Copy link
Copy Markdown
Contributor

Fixes: phoenix-rtos/phoenix-rtos-project#1575
Fixes: phoenix-rtos/phoenix-rtos-project#1417

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

Comment thread stdio/file.c Outdated
Comment thread stdio/file.c Outdated
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the tmpfile function in stdio/file.c to improve error handling and signal interruption management during the lookup of the temporary file device. Specifically, it refines the retry logic for EINTR and ensures errno is correctly set when the lookup fails or the device check is unsuccessful. Feedback suggests using a do-while loop for better readability and adopting the SET_ERRNO macro to maintain consistency with the project's coding standards.

Comment thread stdio/file.c Outdated
@julianuziemblo julianuziemblo force-pushed the julianuziemblo/#1575 branch from 46f1e20 to 0d40de4 Compare May 22, 2026 08:47
@julianuziemblo julianuziemblo force-pushed the julianuziemblo/#1575 branch from 0d40de4 to a8032f5 Compare May 22, 2026 08:48
@github-actions
Copy link
Copy Markdown

Unit Test Results

10 712 tests   10 042 ✅  51m 52s ⏱️
   659 suites     670 💤
     1 files         0 ❌

Results for commit a8032f5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fflush()/rewind() hangs on tmpfile stream blocking behaviour on file created using tmpfile()

1 participant