| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
If LSCOLORS is undefined or partially defined (missing some of the eleven expected
value pairs), the patch will automatically fill in those missing values with default
colors. However, if the LS_COLORS environment variable is already defined, the
application prefer the LS_COLORS approach, maintaining current working flow of the
program.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were making `-user <existing>` imply `! -nouser`, which is valid, but
we were also makeing `! -user <existing>` imply `-nouser`, which isn't.
Fix it by only constraining the `-nouser`/`-nogroup` predicates in the
true case.
While I'm here, fix a similar latent bug that would have triggered if we
ever merged `-readable -and -writable` into one `R_OK | W_OK` test.
Fixes: https://github.com/tavianator/bfs/issues/155
Fixes: 305ee902 ("opt: Track data flow information about predicates")
|
| |
|
|
|
|
|
| |
The XNU posix_spawn() implementation apparently can't handle fchdir() to
a directory opened by the file actions themselves.
|
|
|
|
|
|
|
| |
NetBSD's posix_spawn() surprisingly has the same bug as its
posix_spawnp(): the executable is resolved before the file actions.
Detect this case and work around it by falling back to fork()/exec() if
we need to.
|
|
|
|
|
|
| |
$ bfs -execdir /bin/exe {} \;
is perfectly safe regardless of what's in $PATH.
|
|
|
|
| |
Fixes: 8c130ca ("xspawn: Check X_OK even without $PATH resolution")
|
| |
|
|
|
|
| |
... which requires we process root paths strictly in-order.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes: 9c911d7 ("ctx: Track the token kind of each argument")
|
|
|
|
| |
This matches the behaviour of GNU find.
|
| |
|
|
|
|
|
|
|
|
| |
GNU find intentionally makes later -files0-from options override earlier
ones, for symmetry with similar features like du --files0-from. Change
bfs to match.
Link: https://savannah.gnu.org/bugs/?66965
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The thread-local scratch variables make it non-reentrant for no good
reason. I don't consider the theoretical strict-aliasing violation to
be practically relevant.
This partially reverts commit 90791fc ("list: Make SLIST_REMOVE() more
type-safe").
|
|
|
|
| |
Notes:
Fixes: a36774b ("bfstd: Take sched_getaffinity() into account in nproc()")
|
|
|
|
|
| |
Rather than hiding them with %.0s, use a ternary to replace them with an
empty string if they would be unused.
|
|
|
|
|
|
|
|
| |
Just add the standard prefix to the passed format string in the
diagnostic macros themselves. This lets us write the whole message with
one dprintf() call, minimizing interleaving.
It's also a net win for binary size.
|
| |
|
| |
|
|
|
|
|
|
| |
Compilers apparently aren't smart enough to infer that the odd tail
length fixup "loops" run at most once, and could be converted to ifs, so
do that manually.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Otherwise the order doesn't match lexicographical order on bytes.
|
| |
|
| |
|
|
|
|
|
| |
popcount(map & (bit - 1) & mask) has a longer critical path than
popcount(map & (bit - 1)) & mask.
|
| |
|
|
|
|
|
|
|
|
| |
getpid() could hypothetically be cached (and glibc used to do it).
getppid() can't be, because the parent could die and reparent the child
to init.
Link: https://lore.kernel.org/linux-mm/Z58dIOGlJ3grsAge@casper.infradead.org/
|
|
|
|
|
|
|
|
|
| |
This fixes -fstype on btrfs subvolumes, which previously reported
"unknown" due to their dev_t being potentially different from the mount
point.
Link: https://savannah.gnu.org/bugs/?50859
Link: https://lwn.net/Articles/866582/
|
| |
|
| |
|
|
|
|
| |
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=16060
|
|
|
|
|
|
|
|
|
|
|
|
| |
With some GCC versions, --enable-ubsan leads to this warning:
src/ioq.c: In function ‘ioq_slot_wait’:
src/ioq.c:287:17: warning: ignoring loop annotation
287 | for (int j = 0; j < (1 << i); ++j) {
| ^~~
presumably due to UBSan rewriting the shift to check for overflow. Work
around this by precomputing the iteration count.
|
|
|
|
| |
Notes:
Fixes: 62928dd ("sighook: New sigreset() function to reset all handlers")
|
| |
|
| |
|
|
|
|
|
|
| |
Otherwise the child process runs with all signals blocked.
Fixes: 423cfa4 ("xspawn: Mask signals before fork()")
|
| |
|
| |
|
| |
|
|
|
|
| |
Notes:
Fixes: 90791fc ("list: Make SLIST_REMOVE() more type-safe")
|
| |
|
| |
|