DashboardclistreamDecompressToFile ETXTBSY

streamDecompressToFile ETXTBSY

Category: gotcha
Confidence: 1.00
ID: 01a0857b-5f1d-7e43-ba50-ec3c537205e2
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 1
Source session: 06aLRoB0AYUPw7Dkg
Created: 2026-09-09 09:24:10
Updated: 2026-09-09 09:24:10

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 11h ago

Content

Trap: createWriteStream().end() looks sufficient before spawning a downloaded binary because its callback follows finish, but finish does not guarantee the file descriptor is closed and Linux can raise ETXTBSY. Fix: streamDecompressToFile() uses openSync/short-write-safe writeSync/closeSync, preserving the first write or stream error over close failure. Synchronous close makes compressed downloads race-free before execution.

Move to: