Skip to content

Create a common wrapper function for stat(2) - #3030

Open
Databean wants to merge 1 commit into
google:mainfrom
Databean:posix_stat
Open

Create a common wrapper function for stat(2)#3030
Databean wants to merge 1 commit into
google:mainfrom
Databean:posix_stat

Conversation

@Databean

Copy link
Copy Markdown
Member

This guarantees that TEMP_FAILURE_RETRY is called, and puts the error formatting text in a common place.

Bug: b/546692445

This guarantees that TEMP_FAILURE_RETRY is called, and puts the error
formatting text in a common place.

Bug: b/546692445
@Databean
Databean requested a review from 3405691582 August 14, 2026 22:02

Result<struct stat> Stat(const char* path) {
struct stat ret;
int success = TEMP_FAILURE_RETRY(stat(path, &ret));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Optionally: TEMP_FAILURE_RETRY is a glibcism. Consider stuffing an ifndef define (x) for this somewhere for now?

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.

2 participants