Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/windows/Watch-RamSharedWsl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,13 @@ function Invoke-GuardianWatch {
$eventPath = Join-Path $runDirectory "guardian-events.jsonl"
$telemetryPath = Join-Path $ArtifactRoot "windows-telemetry.jsonl"
Write-GuardianEvent -Path $eventPath -Event "guardian_started" -Data @{ heartbeat = $HeartbeatPath; stale_after_seconds = $StaleAfterSec }
[Console]::add_CancelKeyPress({
param($sender, $e)
$e.Cancel = $true
Write-HostTelemetryRing -Path $telemetryPath
Write-GuardianEvent -Path $eventPath -Event "guardian_stopped" -Data @{ reason = "cancel_key_press" }
[Environment]::Exit(0)
})
while ($true) {
# A current heartbeat must be observed before any HEALTHY proof can be
# published. Never let a boot probe race ahead of stale-heartbeat
Expand Down
Loading