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

Add fcntl function support #4

Open
GabrielGanne opened this issue Jan 28, 2020 · 0 comments
Open

Add fcntl function support #4

GabrielGanne opened this issue Jan 28, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@GabrielGanne
Copy link
Contributor

In the project xdffileio, we only use the function fcntl with the commands F_GETFL and F_SETFL.
I propose that we write two functions in the mmlib to replace the use of fcntl:

fcntl(fd, F_GETFL) could be replaced by: int mm_getflags (int fd)
-> This function returns the value of the file status flag of fd on success, otherwise returns -1 and errno is set to the appropriate value.

fcntl(fd, F_SETFL, flags) could be replaced by: int mm_setflags(int fd, int flags)
-> Set the file descriptor flags of fd to the value specified by flags. Returns -1 in case of error and errno is set to the appropriate value, otherwise returns 0.

@GabrielGanne GabrielGanne added the enhancement New feature or request label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant