Mitchell Hashimoto 8475768ad1 termio/exec: if pty fd HUP, end read thread
Fixes #4884

When our command exits, it will close the pty slave fd. This will
trigger a HUP on our poll. Previously, we only checked for IN. When a fd
is closed, IN triggers forever which would leave to an infinite loop and
100% CPU.

Now, detect the HUP and exit the read thread.
2025-01-24 09:39:22 -08:00
..