Files
Dmitriy Kovalenko 527c5deb74 Close arg0 lock files before removing temporary directories (#54739)
## Why

Removing a directory while its lock file is open can leave `.nfs*` entries on NFS and prevent cleanup.

## What changed

- Drop the `Arg0PathEntryGuard` lock file before its temporary directory.
- On Unix, rename stale helper directories while locked, then close the lock before deleting them. This prevents initializers from publishing at the old path during cleanup.

## Testing

Extend the guard lifetime test to all platforms and assert that its directory is removed after main returns. Strengthen the janitor test to check that cleanup leaves the temporary root empty.

GitOrigin-RevId: 2524afcc63ed7769a7d16b622c1d447918f9478b
2026-10-16 23:56:33 +00:00
..