https://gitlab.synchro.net/main/sbbs/-/commit/c8ac54b8c4877b5ddd200662
Modified Files:
docs/v322_new.md exec/mqtt_spy.js src/sbbs3/jsexec.cpp
Log Message:
mqtt_spy.js, jsexec: keep a spied node's terminal queries from piling up
mqtt_spy.js wrote the spied node's output to the spying terminal as is, including the queries the node sends its own terminal: every logon's
terminal detection asks for the device attributes and the cursor position (twice), and sends a SyncTERM APC query. The spying terminal answered
them. Run by jsexec, the script never reads its input, so the replies
piled up in the tty's input queue; once that (4 KB on Linux) was full, the
line discipline stopped processing input, Ctrl-C included, so the script
could only be killed, after which the shell read the replies as typed
input.
mqtt_spy.js now drops from the spied output every sequence that asks the terminal for a reply: CSI device attributes (c), status reports (n), DECREQTPARM, XTVERSION, DECRQM, XTSMGRAPHICS, kitty keyboard and
XTWINOPS report queries, the RIPscrip query, ENQ, DECID, APC strings, DECRQSS/XTGETTCAP DCS strings, and OSC strings ending in '?'. Sequences
split across MQTT messages are handled. Inside the BBS this also keeps a SyncTERM APC reply from being forwarded to the spied node as typed keys.
jsexec now discards unread input when it restores the terminal at exit,
so what any script's output provoked doesn't reach the shell.
Fixes #1461
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net