Mitchell Hashimoto 797da2f737 termio/exec: avoid potential deadlock with surface message
Fixes #1198

This adds a fix similar to what we discovered with termio messages: we
attempt to send a surface message but if the queue is full we unlock the
terminal state and try again waiting forever.

In all cases, its safe to unlock the mutex while sending the message, no
scenario we send a surface message requires this lock to be held.
2024-01-02 15:34:20 -08:00
..