Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | xspawn: Check X_OK even without $PATH resolution | Tavian Barnes | 2024-06-08 | 1 | -2/+11 |
| | | | | | | | | | | Not all posix_spawn() implementations use errno to report execv() failures from the child process, as that requires either a kernel posix_spawn() implementation or a pipe to pass the error back. This should fix tests/posix/exec_nonexistent on OpenBSD and HPPA. Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hppa&ver=3.3.1-1&stamp=1717489148&raw=0 | ||||
* | diag: New helpers to include xstrerror(errno) automatically | Tavian Barnes | 2024-05-17 | 1 | -1/+1 |
| | |||||
* | xspawn: Mask signals before fork() | Tavian Barnes | 2024-05-15 | 1 | -8/+29 |
| | | | | This prevents signal handlers from running in the child before execve(). | ||||
* | config: Check for posix_spawn_file_actions_addfchdir{,_np}() | Tavian Barnes | 2024-04-19 | 1 | -20/+6 |
| | |||||
* | Rename config.h to prelude.h | Tavian Barnes | 2024-04-19 | 1 | -1/+1 |
| | |||||
* | xspawn: Fix $PATH resolution on NetBSD 10 | Tavian Barnes | 2024-04-09 | 1 | -2/+2 |
| | |||||
* | xspawn: Fix bfs_resolve_late() error reporting | Tavian Barnes | 2024-03-27 | 1 | -8/+2 |
| | |||||
* | xspawn: Don't use posix_spawnp() on macOS | Tavian Barnes | 2024-03-27 | 1 | -1/+33 |
| | | | | | | | | On macOS, posix_spawnp() resolves the executable against the $PATH *before* the file_actions are applied, contrary to the upcoming POSIX wording [1] for posix_spawn_file_actions_addfchdir(). [1]: https://www.austingroupbugs.net/view.php?id=1208#c4830 | ||||
* | xspawn: Refactor $PATH resolution | Tavian Barnes | 2024-03-27 | 1 | -81/+240 |
| | | | | | | | | | Technically, we should be resolving executables *after* applying the file actions. It's only safe to resolve earlier if $PATH contains no relative entries, or if there are no fchdir() actions. The new implementation resolves as early as possible, deferring to posix_spawnp() if necessary for correctness. | ||||
* | xspawn: Implement bfs_spawn_addopen() | Tavian Barnes | 2024-03-27 | 1 | -3/+59 |
| | |||||
* | Re-run include-what-you-use | Tavian Barnes | 2024-03-11 | 1 | -1/+0 |
| | |||||
* | xspawn: Check for _POSIX_SPAWN in bfs_spawn_addfchdir() | Tavian Barnes | 2024-01-17 | 1 | -1/+1 |
| | |||||
* | xspawn: Check for NetBSD 10 before using posix_spawn_..._fchdir() | Tavian Barnes | 2024-01-02 | 1 | -1/+1 |
| | |||||
* | config: New variadic attr(...) macro | Tavian Barnes | 2023-12-18 | 1 | -1/+1 |
| | |||||
* | xspawn: Detect posix_spawn() support | Tavian Barnes | 2023-11-19 | 1 | -9/+31 |
| | |||||
* | config: New attr_maybe_unused macro | Tavian Barnes | 2023-11-15 | 1 | -1/+2 |
| | |||||
* | xspawn: API tweaks | Tavian Barnes | 2023-11-15 | 1 | -22/+30 |
| | |||||
* | Initial support for Cosmopolitan Libc | Tavian Barnes | 2023-11-10 | 1 | -1/+24 |
| | |||||
* | xspawn: Do $PATH resolution up-front | Tavian Barnes | 2023-11-07 | 1 | -21/+19 |
| | | | | | | | | | posix_spawnp() is typically implemented like execvp(), i.e., by repeatedly trying execv() with each $PATH component until it succeeds. This is much slower than resolving the executable path up-front and then calling execv() once, so do that. Fixes: https://github.com/tavianator/bfs/pull/127#issuecomment-1795095126 | ||||
* | xspawn: Wrap the real posix_spawn() if possible | Tavian Barnes | 2023-11-06 | 1 | -45/+122 |
| | | | | Fixes #47. | ||||
* | bfstd: New xwaitpid() wrapper | Tavian Barnes | 2023-10-31 | 1 | -1/+1 |
| | |||||
* | Formatting fixes | Tavian Barnes | 2023-09-27 | 1 | -1/+1 |
| | |||||
* | Use the new list macros | Tavian Barnes | 2023-09-25 | 1 | -6/+5 |
| | |||||
* | alloc: New header for memory allocation utilities | Tavian Barnes | 2023-06-20 | 1 | -1/+2 |
| | |||||
* | list: Return the removed item from SLIST_POP() | Tavian Barnes | 2023-05-20 | 1 | -3/+1 |
| | |||||
* | config: Provide <stdalign.h> and <stdbool.h> | Tavian Barnes | 2023-05-11 | 1 | -1/+0 |
| | | | | In anticipation of C23, since those headers won't be necessary any more. | ||||
* | style: Don't use tabs to indent preprocessor directives | Tavian Barnes | 2023-05-03 | 1 | -1/+1 |
| | |||||
* | list: Use macros instead of type-erased lists | Tavian Barnes | 2023-03-31 | 1 | -7/+8 |
| | |||||
* | xspawn: Use list.h for the action list | Tavian Barnes | 2023-03-29 | 1 | -19/+17 |
| | |||||
* | Replace license boilerplate with SPDX tags | Tavian Barnes | 2023-01-25 | 1 | -15/+2 |
| | | | | | | | And while I'm at it, remove years from copyright declarations. Link: https://spdx.dev/about/ Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ | ||||
* | Fix includes | Tavian Barnes | 2022-11-06 | 1 | -0/+2 |
| | |||||
* | bfstd: Rename from util and reorganize it | Tavian Barnes | 2022-11-06 | 1 | -1/+1 |
| | |||||
* | config: Split out some of util.h into a new header | Tavian Barnes | 2022-11-06 | 1 | -0/+1 |
| | |||||
* | util: Get rid of BFS_HAS_INCLUDE() wrapper for __has_include() | Tavian Barnes | 2022-11-06 | 1 | -1/+1 |
| | | | | | | | | | Since __has_include() needs special preprocessing rules (e.g. not expanding `linux` in `__has_include(<linux/stat.h>)`, macros that expand to __has_include() do not necessarily behave correctly. Instead, we have to directly test `#if __has_include(...)`. See https://bugs.llvm.org/show_bug.cgi?id=37990 for more details. | ||||
* | xspawn: Use _PATH_DEFPATH if _CS_PATH is not defined | Tavian Barnes | 2022-11-06 | 1 | -2/+10 |
| | | | | | And set errno correctly if neither one is. Fixes tests/posix/exec_nopath on Android. | ||||
* | util: Stub out confstr() on Android | Tavian Barnes | 2022-10-17 | 1 | -3/+5 |
| | |||||
* | Source / Include Folder (#88) | トトも | 2022-04-16 | 1 | -0/+318 |
Moved Source Files Into `src` Folder |