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

keep track of file (fdesc) types, properly fill stat st_mode #580

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

wjhun
Copy link
Contributor

@wjhun wjhun commented Mar 2, 2019

Previously, stat(2) and variants were only handling regular and directory file types and would barf on other fd types like sockets. This aims to clean up the tracking of types both internally (in struct fdesc) and in st_mode in struct stat. Some more hardening can be added to make sure that syscalls which take an fd are operating on the correct type of descriptor - I can add some of this before merging.

This should resolve #526 and #562.

@wjhun wjhun requested a review from a team March 2, 2019 02:28
@wjhun wjhun merged commit 04607fa into master Mar 5, 2019
@eyberg eyberg deleted the fix-stat-types branch April 10, 2019 17:16
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.

ioctl 541b support FIONREAD needed
2 participants