BBS:      TELESC.NET.BR
Assunto:  src/conio/curs_cio.c
De:       Deuc¨
Data:     Wed, 18 Mar 2026 21:52:28 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/317f26995eb17ffa4bde55a1
Modified Files:
	src/conio/curs_cio.c
Log Message:
Fix curses CPU spin when PTY is deleted (ticket #216)

When a ttyd/SSH session drops and the PTY is deleted, ioctl(FIONREAD)
returns -1/EIO instead of 0. The EOF detection in curs_getch() only
checked for ioctl()==0, so the EIO case was missed and the
while(get_wch()==ERR) loop spun at ~100% CPU. Treat FIONREAD failure
as a dead fd and return CIO_KEY_QUIT immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]