@@ -309,10 +309,32 @@ jobs:
309309 if ($IsWindows) {
310310 $pipeReady = Test-Path "\\.\pipe\$pipeName"
311311 } else {
312- $pipeReady = Test-Path "/tmp/CoreFxPipe_$pipeName"
312+ # Check both /tmp and $TMPDIR on macOS/Linux
313+ $pipeReady = (Test-Path "/tmp/CoreFxPipe_$pipeName") -or
314+ ($env:TMPDIR -and (Test-Path "$env:TMPDIR/CoreFxPipe_$pipeName"))
313315 }
314316 if ($pipeReady) {
315317 Write-Host "Named Pipe ready after $($i * 500)ms"
318+
319+ # Debug: Show pipe details
320+ if ($IsWindows) {
321+ Write-Host "=== Windows Named Pipes matching pattern ===" -ForegroundColor Cyan
322+ Get-ChildItem "\\.\pipe\" -ErrorAction SilentlyContinue | Where-Object { $_.Name -match "PowerShell|MCP|Communication" } | ForEach-Object { Write-Host " $($_.Name)" }
323+ Write-Host "=== All pipes with our name ===" -ForegroundColor Cyan
324+ $pipes = Get-ChildItem "\\.\pipe\" -ErrorAction SilentlyContinue | Where-Object { $_.Name -eq $pipeName }
325+ Write-Host " Found $($pipes.Count) pipe(s) named '$pipeName'"
326+ } else {
327+ Write-Host "=== macOS/Linux: TMPDIR and pipe locations ===" -ForegroundColor Cyan
328+ Write-Host " TMPDIR: $env:TMPDIR"
329+ Write-Host " Checking /tmp..."
330+ bash -c "ls -la /tmp/CoreFxPipe_* 2>/dev/null || echo ' No CoreFxPipe files in /tmp'"
331+ if ($env:TMPDIR) {
332+ Write-Host " Checking TMPDIR..."
333+ bash -c "ls -la `$TMPDIR/CoreFxPipe_* 2>/dev/null || echo ' No CoreFxPipe files in TMPDIR'"
334+ }
335+ Write-Host "=== lsof for background pwsh ===" -ForegroundColor Cyan
336+ bash -c "lsof -p $($bgProcess.Id) 2>/dev/null | grep -E 'unix|PIPE|sock' | head -10 || echo ' No matching descriptors'"
337+ }
316338 break
317339 }
318340
@@ -329,15 +351,22 @@ jobs:
329351
330352 # Debug: List pipe-related files and sockets
331353 if (-not $IsWindows) {
354+ Write-Host "=== Environment ===" -ForegroundColor Yellow
355+ Write-Host " TMPDIR: $env:TMPDIR"
332356 Write-Host "=== /tmp pipe files (PowerShell) ===" -ForegroundColor Yellow
333357 Get-ChildItem /tmp -Filter "CoreFxPipe_*" -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName }
334358 Write-Host "=== /tmp (native ls) ===" -ForegroundColor Yellow
335359 bash -c "ls -la /tmp/ | grep -i 'corefx\|pipe\|mcp\|communication' || echo 'No matching files'"
336360 bash -c "ls -la /tmp/ | head -20"
361+ if ($env:TMPDIR) {
362+ Write-Host "=== TMPDIR contents ===" -ForegroundColor Yellow
363+ bash -c "ls -la $env:TMPDIR/ 2>/dev/null | grep -i 'corefx\|pipe\|mcp' || echo 'No matching files in TMPDIR'"
364+ bash -c "ls -la $env:TMPDIR/ 2>/dev/null | head -20"
365+ }
337366 Write-Host "=== lsof for background pwsh ===" -ForegroundColor Yellow
338- bash -c "lsof -p $($bgProcess.Id) 2>/dev/null | grep -i 'unix\ |pipe\ |socket' | head -20 || echo 'No sockets found'"
367+ bash -c "lsof -p $($bgProcess.Id) 2>/dev/null | grep -iE 'unix|pipe|socket|stream ' | head -20 || echo 'No sockets found'"
339368 Write-Host "=== All CoreFx sockets (find) ===" -ForegroundColor Yellow
340- bash -c "find /tmp /var/folders -name '*CoreFx*' -o -name '*PowerShell *' 2>/dev/null | head -10 || echo 'None found'"
369+ bash -c "find /tmp \$TMPDIR /var/folders -name '*CoreFx*' -o -name '*Communication *' 2>/dev/null | head -20 || echo 'None found'"
341370 }
342371
343372 # Kill process first, then read outputs
0 commit comments