2020-06-15 14:18:57 +00:00
|
|
|
#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_
|
|
|
|
|
2021-02-08 12:04:42 +00:00
|
|
|
extern const long SIGABRT;
|
|
|
|
extern const long SIGALRM;
|
|
|
|
extern const long SIGBUS;
|
|
|
|
extern const long SIGCHLD;
|
|
|
|
extern const long SIGCONT;
|
Improve ZIP filesystem and change its prefix
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
2021-08-22 08:04:18 +00:00
|
|
|
extern const long SIGEMT;
|
2021-02-08 12:04:42 +00:00
|
|
|
extern const long SIGFPE;
|
|
|
|
extern const long SIGHUP;
|
|
|
|
extern const long SIGILL;
|
Improve ZIP filesystem and change its prefix
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
2021-08-22 08:04:18 +00:00
|
|
|
extern const long SIGINFO;
|
2021-02-08 12:04:42 +00:00
|
|
|
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 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;
|
2020-06-15 14:18:57 +00:00
|
|
|
|
2021-02-08 12:04:42 +00:00
|
|
|
extern const long SIG_ATOMIC_MIN;
|
|
|
|
extern const long SIG_BLOCK;
|
|
|
|
extern const long SIG_SETMASK;
|
|
|
|
extern const long SIG_UNBLOCK;
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
|
2021-06-24 19:31:26 +00:00
|
|
|
#define SIGABRT LITERALLY(6)
|
|
|
|
#define SIGALRM LITERALLY(14)
|
|
|
|
#define SIGFPE LITERALLY(8)
|
|
|
|
#define SIGHUP LITERALLY(1)
|
|
|
|
#define SIGILL LITERALLY(4)
|
|
|
|
#define SIGINT LITERALLY(2)
|
|
|
|
#define SIGIOT LITERALLY(6)
|
|
|
|
#define SIGKILL LITERALLY(9)
|
|
|
|
#define SIGPIPE LITERALLY(13)
|
|
|
|
#define SIGPROF LITERALLY(27)
|
|
|
|
#define SIGQUIT LITERALLY(3)
|
2022-03-25 14:11:44 +00:00
|
|
|
#define SIGSEGV LITERALLY(11)
|
|
|
|
#define SIGTERM LITERALLY(15)
|
|
|
|
#define SIGTRAP LITERALLY(5)
|
|
|
|
#define SIGTTIN LITERALLY(21)
|
|
|
|
#define SIGTTOU LITERALLY(22)
|
|
|
|
#define SIGVTALRM LITERALLY(26)
|
|
|
|
#define SIGWINCH LITERALLY(28)
|
|
|
|
#define SIGXCPU LITERALLY(24)
|
|
|
|
#define SIGXFSZ LITERALLY(25)
|
|
|
|
|
|
|
|
#define SIGBUS SYMBOLIC(SIGBUS)
|
|
|
|
#define SIGCHLD SYMBOLIC(SIGCHLD)
|
|
|
|
#define SIGCONT SYMBOLIC(SIGCONT)
|
|
|
|
#define SIGEMT SYMBOLIC(SIGEMT)
|
|
|
|
#define SIGINFO SYMBOLIC(SIGINFO)
|
|
|
|
#define SIGIO SYMBOLIC(SIGIO)
|
|
|
|
#define SIGPOLL SYMBOLIC(SIGPOLL)
|
|
|
|
#define SIGPWR SYMBOLIC(SIGPWR)
|
2021-06-24 19:31:26 +00:00
|
|
|
#define SIGRTMAX SYMBOLIC(SIGRTMAX)
|
|
|
|
#define SIGRTMIN SYMBOLIC(SIGRTMIN)
|
2020-06-15 14:18:57 +00:00
|
|
|
#define SIGSTKFLT SYMBOLIC(SIGSTKFLT)
|
2021-06-24 19:31:26 +00:00
|
|
|
#define SIGSTOP SYMBOLIC(SIGSTOP)
|
|
|
|
#define SIGSYS SYMBOLIC(SIGSYS)
|
|
|
|
#define SIGTSTP SYMBOLIC(SIGTSTP)
|
2020-06-15 14:18:57 +00:00
|
|
|
#define SIGUNUSED SYMBOLIC(SIGUNUSED)
|
2021-06-24 19:31:26 +00:00
|
|
|
#define SIGURG SYMBOLIC(SIGURG)
|
|
|
|
#define SIGUSR1 SYMBOLIC(SIGUSR1)
|
|
|
|
#define SIGUSR2 SYMBOLIC(SIGUSR2)
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
#define SIG_ATOMIC_MIN SYMBOLIC(SIG_ATOMIC_MIN)
|
2021-06-24 19:31:26 +00:00
|
|
|
#define SIG_BLOCK SYMBOLIC(SIG_BLOCK)
|
|
|
|
#define SIG_SETMASK SYMBOLIC(SIG_SETMASK)
|
|
|
|
#define SIG_UNBLOCK SYMBOLIC(SIG_UNBLOCK)
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SIG_H_ */
|