mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Improve system call documentation
This change also introduces partial faccessat() support for zipos and makes some slight breaking changes in errno results. close() is fixed to use `EBADF` rather than `EINVAL` and we're now using `ENOTSUP` not `EOPNOTSUPP` to indicate that zipos doesn't support a system call yet
This commit is contained in:
parent
0b5f84dd20
commit
ad97775370
18 changed files with 273 additions and 67 deletions
|
@ -32,15 +32,16 @@
|
|||
*
|
||||
* @param fd remains open afterwards
|
||||
* @return some arbitrary new number for fd
|
||||
* @raise EOPNOTSUPP if zipos file
|
||||
* @raise EBADF if fd isn't open
|
||||
* @raise EPERM if pledge() is in play without stdio
|
||||
* @raise ENOTSUP if `fd` is a zip file descriptor
|
||||
* @raise EBADF if `fd` is negative or not open
|
||||
* @asyncsignalsafe
|
||||
* @vforksafe
|
||||
*/
|
||||
int dup(int fd) {
|
||||
int rc;
|
||||
if (__isfdkind(fd, kFdZip)) {
|
||||
rc = eopnotsupp();
|
||||
rc = enotsup();
|
||||
} else if (!IsWindows()) {
|
||||
rc = sys_dup(fd);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue