Skip to content

libblkid: Preserve errno on library constructor #3648

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crrodriguez
Copy link
Contributor

constructors run before main and may call functions that change errno.

constructors run before main and may call functions that
change errno.
@t-8ch
Copy link
Member

t-8ch commented Jul 9, 2025

When is an issue?

@karelzak
Copy link
Collaborator

karelzak commented Jul 14, 2025

Yes, why do we need it? I think that when you rely on errno, you should ensure it's zero before entering the section where you care about the value. The errno protection makes sense in things like signal handlers, etc.

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.

3 participants