Extended the freeze_support fix to work on Linux and macOS, not just Windows.
The spawn loop can occur on any platform when PyInstaller bundles apps that
use multiprocessing.
Changes:
- Removed Windows-only condition for freeze_support()
- Added multiprocessing.set_start_method('spawn', force=True)
- Set spawn method for consistency across all platforms
- Prevents fork-related issues on Linux with PyInstaller
Why this is needed:
- PyTorch, faster-whisper, and RealtimeSTT all use multiprocessing
- PyInstaller frozen executables need explicit spawn method configuration
- Linux defaults to 'fork' which can cause issues with frozen executables
- 'spawn' method is more reliable with PyInstaller on all platforms
This ensures the app launches only once on Windows, Linux, and macOS.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
3.9 KiB
3.9 KiB