| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The POSIX spec for readdir() [1] says:
> If a file is removed from or added to the directory after the most
> recent call to opendir() or rewinddir(), whether a subsequent call
> to readdir() returns an entry for that file is unspecified.
which implies that a loop of readdir()/unlink()/creat() may continue to
return new files unendingly. This was even observed on a Linux 6.6
tmpfs mount [2].
It's not clear whether find(1) is also permitted to loop endlessly in
this case, but in case it is, let's avoid the whole problem by limiting
the -exec to happen at most once.
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
[2]: https://lore.kernel.org/linux-fsdevel/20231113180616.2831430-1-tavianator@tavianator.com/
|
|
|
|
| |
This matches the behaviour of GNU find.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This follows a behaviour change in GNU findutils 4.9.0.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #97.
|
| |
|
| |
|
|
|
|
| |
Otherwise, propagate the exit code from bfs
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
From the bfs_ctx_flush() implementation:
// Before executing anything, flush all open streams. This ensures that
// - the user sees everything relevant before an -ok[dir] prompt
But that only works if we call it before the prompt.
This reverts commit 21344dfb72f9b65b366ca5f754f1bc35f52da3c7.
|
|
|
|
|
|
| |
POSIX touch(1) doesn't include the -h option, and indeed OpenBSD doesn't
implement it. Making our own utility also lets us add some handy
extensions like -p (create parents) and -M (set permissions).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test used systemd-mount to set up an automount on scratch/mnt.
If a previous test mounted something there, systemd will notice that
asynchronously and may not have noticed the unmount by the time that test
runs. This led to the test randomly being skipped sometimes when
systemd-mount failed. It could be reproduced with a loop like this:
$ for _ in {1..10}; ./tests/tests.sh common/L_mount gnu/inum_automount
Work around it by using scratch/automnt instead to avoid conflicts.
|
| |
|
|
|
|
| |
And try to unmount things if the a test left them mounted.
|
| |
|
|
|