Skip to content

fix(build): make re no longer stops on a file NFS keeps for a running shell - #178

Merged
LESdylan merged 1 commit into
developfrom
fix/build-nfs-fclean
Oct 18, 2026
Merged

LESdylan merged 1 commit into
developfrom
fix/build-nfs-fclean

Conversation

@LESdylan

Copy link
Copy Markdown
Member

On sgoinfre (NFS), a deleted file still open in a process stays as build/bin/.nfsXXXX and cannot be removed. With any shell from build/bin running, fclean's rm -rf build failed and make re stopped with no binary.

  • fclean now succeeds when only such files remain, and names them; anything else that cannot be removed still fails the target.
  • tests/fclean_nfs_test.py runs the recipe cut from the Makefile: only-.nfs → succeeds; unwritable dir → fails; off NFS → SKIP.
  • Verified on sgoinfre: make re exit 2 before, exit 0 after, with a shell from build/bin running.

🤖 Generated with Claude Code

… shell

On NFS (the 42 machines' sgoinfre) a deleted file that a process still has
open stays behind as .nfsXXXX until that process exits, and removing it
fails with "Device or resource busy". With any shell started from
build/bin still running, fclean's final `rm -rf build` hit exactly that
file, so `make re` stopped before compiling anything and left no binary.

fclean now accepts a build tree reduced to such files: it says which one
it kept and succeeds; the rebuild is unaffected, since the file has a
name of its own. Anything else that cannot be removed is retried and
fails the target as before.

tests/fclean_nfs_test.py cuts the recipe out of the Makefile and runs it
next to the repo: with only a held-open .nfs file fclean succeeds and
names it; with an unwritable directory it still fails. Off NFS no .nfs
file appears and the test reports SKIP. Verified on sgoinfre: `make re`
exit 2 before, exit 0 after, with a shell from build/bin running.
@LESdylan
LESdylan merged commit 74592be into develop Oct 18, 2026
35 checks passed
@LESdylan
LESdylan deleted the fix/build-nfs-fclean branch October 18, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant