powerlevel10k/internal
weykon 349cd9b416 fix: prevent PTY leak by detecting orphaned worker processes
When a tmux session is killed (e.g., via `tmux kill-session`), the
zshexit hook may not fire, leaving p10k worker and gitstatus daemon
processes orphaned (PPID=1). These orphaned processes hold PTY
resources indefinitely, eventually causing PTY exhaustion.

This fix adds parent process monitoring:

1. worker.zsh: Check PPID in main loop - exit if parent dies
2. gitstatus.plugin.zsh: Add background monitor that detects
   PPID change to 1 (init/launchd) and triggers cleanup

The fix handles the case where shells are terminated without
proper cleanup (SIGKILL, tmux kill-session, etc.).

Fixes orphaned processes like:
- p10k.worker.*.fifo holders
- gitstatus.POWERLEVEL9K.*.fifo holders
- gitstatusd-darwin-arm64 daemons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:41:27 +08:00
..
configure.zsh remove MULTIBYTE requirement from the configuration wizard (#2397) 2023-07-29 17:01:40 +02:00
icons.zsh minor cleanup (#2758) 2024-09-17 14:10:20 +02:00
notes.md notes 2020-06-15 17:56:32 +02:00
p10k.zsh formatting 2026-01-22 15:10:11 +01:00
parser.zsh fix(parser.zsh): `_p9k_parse_buffer` docstring typo (#2820) 2025-01-29 05:28:19 -08:00
wizard.zsh Add AlmaLinux icon 2024-09-17 00:47:40 -04:00
worker.zsh fix: prevent PTY leak by detecting orphaned worker processes 2026-01-26 20:41:27 +08:00