mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Release pledge v1.8
This commit is contained in:
parent
05197afca2
commit
7d6835c0dd
3 changed files with 19 additions and 2 deletions
|
@ -35,12 +35,27 @@
|
|||
*
|
||||
* This function changes the current file position. For documentation
|
||||
* on file position behaviors and gotchas, see the lseek() function.
|
||||
* This function may be used on socket file descriptors, including on
|
||||
* Windows.
|
||||
*
|
||||
* @param fd is something open()'d earlier
|
||||
* @param buf is copied into, cf. copy_file_range(), sendfile(), etc.
|
||||
* @param size in range [1..0x7ffff000] is reasonable
|
||||
* @return [1..size] bytes on success, 0 on EOF, or -1 w/ errno; with
|
||||
* exception of size==0, in which case return zero means no error
|
||||
* @raise EBADF if `fd` is negative or not an open file descriptor
|
||||
* @raise EBADF if `fd` is open in `O_WRONLY` mode
|
||||
* @raise EFAULT if `size` is nonzero and `buf` points to bad memory
|
||||
* @raise EPERM if pledge() is in play without the stdio promise
|
||||
* @raise EIO if low-level i/o error happened
|
||||
* @raise EINTR if signal was delivered instead
|
||||
* @raise ENOTCONN if `fd` is a socket and it isn't connected
|
||||
* @raise ECONNRESET if socket peer forcibly closed connection
|
||||
* @raise ETIMEDOUT if socket transmission timeout occurred
|
||||
* @raise EAGAIN if `O_NONBLOCK` is in play and read needs to block,
|
||||
* or `SO_RCVTIMEO` is in play and the time interval elapsed
|
||||
* @raise ENOBUFS is specified by POSIX
|
||||
* @raise ENXIO is specified by POSIX
|
||||
* @asyncsignalsafe
|
||||
* @restartable
|
||||
* @vforksafe
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
*
|
||||
* This function changes the current file position. For documentation
|
||||
* on file position behaviors and gotchas, see the lseek() function.
|
||||
* This function may be used on socket file descriptors, including on
|
||||
* Windows.
|
||||
*
|
||||
* @param fd is open file descriptor
|
||||
* @param buf is copied from, cf. copy_file_range(), sendfile(), etc.
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/calls/landlock.h"
|
||||
#include "libc/calls/pledge.h"
|
||||
#include "libc/calls/pledge.internal.h"
|
||||
|
@ -40,6 +39,7 @@
|
|||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/kcpuids.h"
|
||||
|
@ -115,7 +115,7 @@ usage: pledge.com [-hnN] PROG ARGS...\n\
|
|||
- vminfo: allows /proc/stat, /proc/self/maps, etc.\n\
|
||||
- tmppath: allows /tmp, $TMPPATH, lstat, unlink\n\
|
||||
\n\
|
||||
pledge.com v1.7\n\
|
||||
pledge.com v1.8\n\
|
||||
copyright 2022 justine alexandra roberts tunney\n\
|
||||
https://twitter.com/justinetunney\n\
|
||||
https://linkedin.com/in/jtunney\n\
|
||||
|
|
Loading…
Reference in a new issue