Files
opencode-obsidian/src
Gerkinfeltser 2a824b6d19 fix: properly cleanup Windows process tree on Obsidian exit
### Fixed
- Replaced unreliable taskkill /T with PowerShell Get-CimInstance for child process detection in WindowsProcess.ts
- Fixed orphaned node.exe processes when Obsidian closes by killing child processes before parent
- Added proper cleanup when shell: true creates cmd.exe -> node.exe process tree

### Added
- Static currentProcess field to track active process for cleanup during window close
- Static cleanupHandlerRegistered flag to prevent duplicate event handlers
- beforeunload event handler for synchronous cleanup when Obsidian window closes
- killProcessSync method for immediate process termination without async delays
- registerCleanupHandler method to set up window close event listener

### Changed
- Updated start method to store process reference and register cleanup handler
- Modified stop method to use PowerShell child lookup before killing parent process
- Enhanced error handling with try/catch blocks for PowerShell and taskkill operations
2026-02-23 18:39:32 +01:00
..
2026-01-03 20:35:40 +00:00
2026-02-14 17:13:11 +01:00
2026-02-14 17:13:11 +01:00