mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-01 03:53:33 +00:00
00611e9b06
The ZIP filesystem has a breaking change. You now need to use /zip/ to open() / opendir() / etc. assets within the ZIP structure of your APE binary, instead of the previous convention of using zip: or zip! URIs. This is needed because Python likes to use absolute paths, and having ZIP paths encoded like URIs simply broke too many things. Many more system calls have been updated to be able to operate on ZIP files and file descriptors. In particular fcntl() and ioctl() since Python would do things like ask if a ZIP file is a terminal and get confused when the old implementation mistakenly said yes, because the fastest way to guarantee native file descriptors is to dup(2). This change also improves the async signal safety of zipos and ensures it doesn't maintain any open file descriptors beyond that which the user has opened. This change makes a lot of progress towards adding magic numbers that are specific to platforms other than Linux. The philosophy here is that, if you use an operating system like FreeBSD, then you should be able to take advantage of FreeBSD exclusive features, even if we don't polyfill them on other platforms. For example, you can now open() a file with the O_VERIFY flag. If your program runs on other platforms, then Cosmo will automatically set O_VERIFY to zero. This lets you safely use it without the need for #ifdef or ifstatements which detract from readability. One of the blindspots of the ASAN memory hardening we use to offer Rust like assurances has always been that memory passed to the kernel via system calls (e.g. writev) can't be checked automatically since the kernel wasn't built with MODE=asan. This change makes more progress ensuring that each system call will verify the soundness of memory before it's passed to the kernel. The code for doing these checks is fast, particularly for buffers, where it can verify 64 bytes a cycle. - Correct O_LOOP definition on NT - Introduce program_executable_name - Add ASAN guards to more system calls - Improve termios compatibility with BSDs - Fix bug in Windows auxiliary value encoding - Add BSD and XNU specific errnos and open flags - Add check to ensure build doesn't talk to internet
100 lines
2.9 KiB
C
100 lines
2.9 KiB
C
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SIG_H_
|
|
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SIG_H_
|
|
#include "libc/runtime/symbolic.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
extern const long SIGABRT;
|
|
extern const long SIGALRM;
|
|
extern const long SIGBUS;
|
|
extern const long SIGCHLD;
|
|
extern const long SIGCONT;
|
|
extern const long SIGEMT;
|
|
extern const long SIGFPE;
|
|
extern const long SIGHUP;
|
|
extern const long SIGILL;
|
|
extern const long SIGINFO;
|
|
extern const long SIGINT;
|
|
extern const long SIGIO;
|
|
extern const long SIGIOT;
|
|
extern const long SIGKILL;
|
|
extern const long SIGPIPE;
|
|
extern const long SIGPOLL;
|
|
extern const long SIGPROF;
|
|
extern const long SIGPWR;
|
|
extern const long SIGQUIT;
|
|
extern const long SIGRTMAX;
|
|
extern const long SIGRTMIN;
|
|
extern const long SIGSEGV;
|
|
extern const long SIGSTKFLT;
|
|
extern const long SIGSTKSZ;
|
|
extern const long SIGSTOP;
|
|
extern const long SIGSYS;
|
|
extern const long SIGTERM;
|
|
extern const long SIGTRAP;
|
|
extern const long SIGTSTP;
|
|
extern const long SIGTTIN;
|
|
extern const long SIGTTOU;
|
|
extern const long SIGUNUSED;
|
|
extern const long SIGURG;
|
|
extern const long SIGUSR1;
|
|
extern const long SIGUSR2;
|
|
extern const long SIGVTALRM;
|
|
extern const long SIGWINCH;
|
|
extern const long SIGXCPU;
|
|
extern const long SIGXFSZ;
|
|
|
|
extern const long SIG_ATOMIC_MIN;
|
|
extern const long SIG_BLOCK;
|
|
extern const long SIG_SETMASK;
|
|
extern const long SIG_UNBLOCK;
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#define SIGABRT LITERALLY(6)
|
|
#define SIGALRM LITERALLY(14)
|
|
#define SIGBUS SYMBOLIC(SIGBUS)
|
|
#define SIGCHLD SYMBOLIC(SIGCHLD)
|
|
#define SIGCONT SYMBOLIC(SIGCONT)
|
|
#define SIGEMT SYMBOLIC(SIGEMT)
|
|
#define SIGFPE LITERALLY(8)
|
|
#define SIGHUP LITERALLY(1)
|
|
#define SIGILL LITERALLY(4)
|
|
#define SIGINFO SYMBOLIC(SIGINFO)
|
|
#define SIGINT LITERALLY(2)
|
|
#define SIGIO SYMBOLIC(SIGIO)
|
|
#define SIGIOT LITERALLY(6)
|
|
#define SIGKILL LITERALLY(9)
|
|
#define SIGPIPE LITERALLY(13)
|
|
#define SIGPOLL SYMBOLIC(SIGPOLL)
|
|
#define SIGPROF LITERALLY(27)
|
|
#define SIGPWR SYMBOLIC(SIGPWR)
|
|
#define SIGQUIT LITERALLY(3)
|
|
#define SIGRTMAX SYMBOLIC(SIGRTMAX)
|
|
#define SIGRTMIN SYMBOLIC(SIGRTMIN)
|
|
#define SIGSEGV LITERALLY(11)
|
|
#define SIGSTKFLT SYMBOLIC(SIGSTKFLT)
|
|
#define SIGSTKSZ SYMBOLIC(SIGSTKSZ)
|
|
#define SIGSTOP SYMBOLIC(SIGSTOP)
|
|
#define SIGSYS SYMBOLIC(SIGSYS)
|
|
#define SIGTERM LITERALLY(15)
|
|
#define SIGTRAP LITERALLY(5)
|
|
#define SIGTSTP SYMBOLIC(SIGTSTP)
|
|
#define SIGTTIN LITERALLY(21)
|
|
#define SIGTTOU LITERALLY(22)
|
|
#define SIGUNUSED SYMBOLIC(SIGUNUSED)
|
|
#define SIGURG SYMBOLIC(SIGURG)
|
|
#define SIGUSR1 SYMBOLIC(SIGUSR1)
|
|
#define SIGUSR2 SYMBOLIC(SIGUSR2)
|
|
#define SIGVTALRM LITERALLY(26)
|
|
#define SIGWINCH LITERALLY(28)
|
|
#define SIGXCPU LITERALLY(24)
|
|
#define SIGXFSZ LITERALLY(25)
|
|
|
|
#define SIG_ATOMIC_MIN SYMBOLIC(SIG_ATOMIC_MIN)
|
|
#define SIG_BLOCK SYMBOLIC(SIG_BLOCK)
|
|
#define SIG_SETMASK SYMBOLIC(SIG_SETMASK)
|
|
#define SIG_UNBLOCK SYMBOLIC(SIG_UNBLOCK)
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SIG_H_ */
|