Commit 4249499
libvncserver: don't exit listener thread on EINTR from select()
listenerRun() exited on any select() failure, including EINTR, which
is never restarted by SA_RESTART (see signal(7)). A single stray
signal delivered to the listener thread thus permanently killed the
accept loop while the listening sockets stayed open: clients still
completed the TCP handshake but hung forever waiting for the RFB
protocol version greeting, because nothing called accept() anymore.
Observed in the field on Android, where the platform's debugging and
profiling infrastructure routinely delivers signals to app threads.
Treat EINTR/EAGAIN as benign and retry.
Closes #732
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 6389c1c commit 4249499
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| 654 | + | |
| 655 | + | |
654 | 656 | | |
655 | 657 | | |
656 | 658 | | |
| |||
0 commit comments