Skip to main content

Module fence

Module fence 

Source
Expand description

Cross-boundary recovery fence shared by Windows and a managed WSL guest.

Windows share locks, Unix flock, and SQLite byte-range locks do not interoperate reliably through DrvFS. Directory creation does: exactly one side can create the same directory. The directory is intentionally durable on process death; an abandoned owner blocks recovery instead of allowing a possibly concurrent runner launch.

Structs§

DrainRequest
FenceClaim
A successfully created cross-boundary directory claim.
FenceOwner
GuestHeartbeat
GuestRecoveryConfig
RecoveryStatus

Enums§

FenceError
FenceOwnerKind
RecoveryPhase

Constants§

FENCE_DIRECTORY
GUEST_CONFIG_FILE
HEARTBEAT_FILE
OWNER_FILE
RECOVERY_STATUS_FILE
REQUEST_FILE
SCHEMA_VERSION

Functions§

clear_recovery
recovery_root
Windows-side directory shared with one exact distribution.
retire_windows_recovery
Retire coordination written by a Windows recovery watchdog that no longer has authority to run. A guest launch claim is deliberately preserved. The fence and request may have different generations after a watchdog restart, so each Windows-owned generation is cleared independently.
unmanaged_runner_service_count
Persistent runner services are outside runner-manager’s attempt journal. Their presence blocks automated WSL termination even while they look idle.