Issue 240019
Summary [libc] Implement posix_close in unistd
Labels libc
Assignees
Reporter amanmaurya92
    ### Summary
Implement the standard POSIX.1-2024 function `posix_close` in `<unistd.h>`.

### Specification
POSIX.1-2024: https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_close.html
```c
int posix_close(int fildes, int flag);
```

### Details
- `posix_close` closes the file descriptor `fildes`.
- Validates `flag` (`0` or `POSIX_CLOSE_RESTART`; invalid flags return `EINVAL`).
- On Linux, delegates to standard `close` syscall.
- Add public declaration, entrypoints across Linux targets, and unit tests.

I would like to work on this issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to