BBS:      TELESC.NET.BR
Assunto:  src/ssh/README.md TODO.md client.c deucessh.h server.c ssh-internal.h
De:       Deuc¨
Data:     Sat, 28 Mar 2026 12:55:04 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/f7930e7e170ab1235b2125fd
Modified Files:
	src/ssh/README.md TODO.md client.c deucessh.h server.c ssh-internal.h ssh.c
Log Message:
Close item 83: terminate callback + single-fire set_terminate

Add dssh_terminate_cb and dssh_session_set_terminate_cb() so the
application can close sockets or signal its event loop when the session
terminates, unblocking I/O callbacks that would otherwise cause
dssh_session_cleanup() to hang on thrd_join.

Make dssh_session_set_terminate() single-fire via atomic_exchange --
previously it unconditionally re-broadcast all condvars on every call.
The callback fires exactly once, before condvar broadcasts, from
whichever thread triggers termination.

Update I/O callback documentation to state that callbacks MUST return
promptly when dssh_session_is_terminated() is true.  Update client.c
and server.c to use shutdown(fd, SHUT_RDWR) in the terminate callback.

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

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