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

-[NSFileHandle initWithFileDescriptor:] logs a message each time fstat() doesn't succeed on UNIX #417

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

litherum
Copy link
Contributor

@litherum litherum commented Jun 9, 2024

fstat() on UNIX isn't guaranteed to always succeed, even if the file handle is valid. Special files may or may not support fstat() in the kernel.

(For context, I'm working on a Vulkan application. Vulkan has facilities to send certain objects across processes by representing the objects as file descriptors. These file descriptors still need to be close()d, which makes them good candidates for wrapping an NSFileHandle around them, but they do not support fstat(). I'm creating multiple of these each frame in the application, which means the line "unable to get status of descriptor" appears very often in the terminal while my application is running.)

…t() doesn't succeed on UNIX

fstat() on UNIX isn't guaranteed to always succeed, even if the file handle is valid. Special files may or may not support fstat() in the kernel.

(For context, I'm working on a Vulkan application. Vulkan has facilities to send certain objects across processes by representing the objects as file descriptors. These file descriptors still need to be close()d, which makes them good candidates for wrapping an NSFileHandle around them, but they do not support fstat(). I'm creating multiple of these each frame in the application, which means the line "unable to get status of descriptor" appears very often in the terminal while my application is running.)
@litherum litherum requested a review from rfm as a code owner June 9, 2024 21:21
Copy link
Contributor

@rfm rfm left a comment

Choose a reason for hiding this comment

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

Looks fine. Thanks.

@rfm rfm merged commit 3202bd0 into gnustep:master Jun 10, 2024
@litherum litherum deleted the nsfilehandle-fstat branch June 10, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants