Skip to content
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

Inconsistent behavior of getln() on error #65

Closed
sfzhi opened this issue Jun 11, 2022 · 1 comment
Closed

Inconsistent behavior of getln() on error #65

sfzhi opened this issue Jun 11, 2022 · 1 comment

Comments

@sfzhi
Copy link

sfzhi commented Jun 11, 2022

The getln() function behaves inconsistently w.r.t. closing the file descriptor on error - sometimes it does that, sometimes it doesn't. As the result, if getln() returns an error, the caller has no idea whether the file descriptor has been closed or not.

In general, closing the file descriptor is quite surprising behavior for such a function. If it is desirable for whatever reason, it would be nice to mention it in the comment describing the function.

@janmojzis
Copy link
Owner

fixed, thank for report!

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

No branches or pull requests

2 participants