mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Strengthen the pledge() polyfill
This commit is contained in:
parent
a6f65eea7c
commit
3c92adfd6e
79 changed files with 1457 additions and 357 deletions
|
@ -22,12 +22,14 @@
|
|||
#include "libc/sysv/consts/af.h"
|
||||
|
||||
/**
|
||||
* Creates bidirectional pipe.
|
||||
* Creates bidirectional pipe, e.g.
|
||||
*
|
||||
* int sv[2];
|
||||
* socketpair(AF_UNIX, SOCK_STREAM, 0, sv);
|
||||
*
|
||||
* @param family should be AF_UNIX or synonymously AF_LOCAL
|
||||
* @param type can be SOCK_STREAM (for TCP), SOCK_DGRAM (e.g. UDP), or
|
||||
* SOCK_RAW (IP) so long as IP_HDRINCL was passed to setsockopt();
|
||||
* and additionally, may be or'd with SOCK_NONBLOCK, SOCK_CLOEXEC
|
||||
* @param type can be SOCK_STREAM or SOCK_DGRAM and additionally,
|
||||
* may be or'd with SOCK_NONBLOCK, SOCK_CLOEXEC
|
||||
* @param sv a vector of 2 integers to store the created sockets
|
||||
* @return 0 if success, -1 in case of error
|
||||
* @error EFAULT, EPFNOSUPPORT, etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue