-
Notifications
You must be signed in to change notification settings - Fork 1
Make OS lease guards prove process-bound release across inherited descriptors #718
Copy link
Copy link
Open
Labels
backlogBacklog (not current milestone)Backlog (not current milestone)cool-ideasCool Idea™ — captured inspiration, not yet scheduledCool Idea™ — captured inspiration, not yet scheduledcoreEcho Core TechnologiesEcho Core Technologieslane:cool-ideasMethod lane cool-ideas.Method lane cool-ideas.legend:testMethod legend test.Method legend test.needs-designMethod closeout state needs-design.Method closeout state needs-design.priority:lowMethod priority low.Method priority low.runtimeRuntime coreRuntime corespecSpec/Design documentSpec/Design documenttype:enhancementMethod work type enhancement.Method work type enhancement.
Description
Metadata
Metadata
Assignees
Labels
backlogBacklog (not current milestone)Backlog (not current milestone)cool-ideasCool Idea™ — captured inspiration, not yet scheduledCool Idea™ — captured inspiration, not yet scheduledcoreEcho Core TechnologiesEcho Core Technologieslane:cool-ideasMethod lane cool-ideas.Method lane cool-ideas.legend:testMethod legend test.Method legend test.needs-designMethod closeout state needs-design.Method closeout state needs-design.priority:lowMethod priority low.Method priority low.runtimeRuntime coreRuntime corespecSpec/Design documentSpec/Design documenttype:enhancementMethod work type enhancement.Method work type enhancement.
Idea
Treat an operating-system file lease as an explicit process-bound authority guard rather than an owned
Filewhose close is assumed to release authority.Rust's Unix file-lock contract maps
File::try_locktoflockand retains the lock until every duplicated or inherited descriptor is closed, unlessFile::unlockis called.O_CLOEXECstill leaves a fork-to-exec inheritance window. The writer-epoch lease exposed this distinction when a musl test attempted immediate takeover while another test spawned a child process.A reusable internal lease guard could make the contract executable:
Dropperforms a best-effort unlock fallback;Acceptance
This is a design follow-up, not a blocker for the narrow PR #716 CI repair.