LibC: Improve error handling for unimplemented functions#26514
LibC: Improve error handling for unimplemented functions#26514po-nuvai wants to merge 1 commit intoSerenityOS:masterfrom
Conversation
|
Hello! One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the |
Set errno to ENOSYS before returning -1 in getpriority(), setpriority(), chroot(), and nice() stubs. Also fix nice() to return -1 instead of the incr argument, and fnmatch() to return FNM_NOMATCH instead of 0.
0f6d355 to
1e36e9e
Compare
| // https://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html | ||
| int fnmatch([[maybe_unused]] char const* pattern, [[maybe_unused]] char const* string, [[maybe_unused]] int flags) | ||
| { | ||
| dbgln("FIXME: Implement fnmatch()"); |
There was a problem hiding this comment.
I would keep these FIXME dbglns. Having this output makes it easier to debug ports that attempt to use these functions and fail because we don't implement them yet.
|
According to POSIX, |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! |
|
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions! |
This PR improves error handling for several unimplemented LibC functions:
incrargument)These functions now properly indicate they are not implemented by setting errno to ENOSYS, following POSIX conventions.