Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | sighook: New SH_ONESHOT flag | Tavian Barnes | 2024-12-02 | 1 | -1/+19 |
| | |||||
* | sighook: Return instead of re-raising for faults | Tavian Barnes | 2024-11-23 | 1 | -5/+11 |
| | | | | | | | | | | | This makes the death look exactly like it would if we didn't handle the signal at all. Coredumps will point at the right instruction, segfaults will get logged in dmesg again, etc. Technically POSIX says this is undefined, but if we get a fault, we've already done something undefined anyway ;) Link: https://github.com/rust-lang/rust/issues/26458 | ||||
* | sighook: Check for SA_RESTART before using it | Tavian Barnes | 2024-11-23 | 1 | -1/+7 |
| | | | | QNX doesn't support SA_RESTART. | ||||
* | sighook: Don't forget to reset list->tail on the last sigpop() | Tavian Barnes | 2024-10-10 | 1 | -0/+2 |
| | | | | | | | This was causing a UAF if we ever unregistered the last hook for a signal and then re-registered one. Fixes: 75b7f70 ("sighook: Make sigunhook() O(1)") | ||||
* | Fix includes | Tavian Barnes | 2024-08-29 | 1 | -0/+1 |
| | |||||
* | build: Move feature test macros to prelude.h | Tavian Barnes | 2024-08-28 | 1 | -1/+0 |
| | | | | | | This replaces the explicit CPPFLAGS list in flags.mk with just `-include src/prelude.h`, shortening our compiler command lines and allowing them to be easily documented. | ||||
* | prelude: Split bfs-specific utilities into new bfs.h header | Tavian Barnes | 2024-08-28 | 1 | -0/+3 |
| | |||||
* | sighook: Fix typo in comment | Tavian Barnes | 2024-08-17 | 1 | -1/+1 |
| | |||||
* | sighook: Disable semaphores on NetBSD | Tavian Barnes | 2024-08-11 | 1 | -1/+2 |
| | |||||
* | bfstd: New sysoption() macro to check for POSIX option runtime support | Tavian Barnes | 2024-08-09 | 1 | -7/+17 |
| | | | | | | | | | | POSIX allows optional features to be supported at compile time but not necessarily at run time by defining _POSIX_OPTION to 0 and requiring users to check sysconf(_SC_OPTION) > 0. The new sysoption() macro simplifies the check. sighook() and bfs_spawn() now check for conditional runtime support for the relevant POSIX options. | ||||
* | Update opengroup.org links to POSIX 2024 | Tavian Barnes | 2024-08-02 | 1 | -5/+5 |
| | |||||
* | prelude: Simplify attributes | Tavian Barnes | 2024-07-28 | 1 | -1/+2 |
| | |||||
* | sighook: Make sigunhook() O(1) | Tavian Barnes | 2024-07-15 | 1 | -41/+51 |
| | |||||
* | sighook: Replace sigtables with RCU-protected linked lists | Tavian Barnes | 2024-07-07 | 1 | -148/+68 |
| | | | | | | | | This fixes an ABA problem where sigdispatch() could think no handlers are registered for a signal even when there are. Link: https://unix.stackexchange.com/a/779594/56202 Fixes: 375caac ("sighook: New utilities for hooking signals") | ||||
* | sighook: Shard the signal table | Tavian Barnes | 2024-06-07 | 1 | -7/+24 |
| | |||||
* | sighook: Ignore sigaction() errors in atsigexit() | Tavian Barnes | 2024-06-07 | 1 | -10/+6 |
| | | | | This fixes bfs under Valgrind, which reserves SIGRTMAX for its own use. | ||||
* | sighook: Check that atomic size_t is lock-free | Tavian Barnes | 2024-06-03 | 1 | -0/+4 |
| | |||||
* | sighook: Allow sigunhook(NULL) | Tavian Barnes | 2024-05-25 | 1 | -0/+4 |
| | |||||
* | diag: New helpers to include xstrerror(errno) automatically | Tavian Barnes | 2024-05-17 | 1 | -2/+2 |
| | |||||
* | sighook: New utilities for hooking signals | Tavian Barnes | 2024-05-16 | 1 | -0/+600 |
This allows multiple hooks to be installed for a single signal. |