mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 16:39:24 +02:00
c407f377398321c8a51c878b67f98b7619ba3530
A client disconnecting with a terminal control query outstanding could park a server thread forever, wedging prompts and command dispatch for every client (#6841, #6840): - VirtualTerminal.cancelRequests drained only 2 of the 8 pending terminal maps, so waiters on the set-echo, raw-mode, attributes, and size queues were never woken. It now drains all of them, with offer instead of put so the shutdown path itself cannot block on a full queue. - Raw-mode requests were registered in the set-echo map, so their waiters were invisible to any raw-mode-specific handling. - Closing a channel terminal did not wake readers parked on its input stream; close now delivers EOF so a prompt blocked on a dead client's input unwinds. - The failed-load prompt read its answer byte from System.in, which under non-virtual IO is the process's own stdin and never carries client input; it now reads the active terminal's input stream. - ServerSessionImpl.close() could not deliver EOF to the peer while its read thread was parked in a native read (the native close is never delivered), so the server never noticed orderly client disconnects at all. It now shuts down socket input first, which wakes the reader and lets the close through. Regression test: a raw-protocol client that attaches, triggers the failed-load prompt without answering the raw-mode query, and disconnects; the server must shut down cleanly (EOF at the prompt maps to 'q') instead of staying parked forever. Fails on develop with the server still alive and the command loop parked in setRawMode; passes with this change. VirtualTerminalSpec pins the drain across all eight maps and that other channels are untouched. Generated-by: kimi-code/k3 (Oh My Pi)
sbt
sbt is a build tool for Scala, Java, and more.
For general documentation, see https://www.scala-sbt.org/.
sbt 2.x
This is the 2.x series of sbt. The source code of sbt is split across several GitHub repositories, including this one.
- sbt/io hosts
sbt.iomodule. - sbt/zinc hosts Zinc, an incremental compiler for Scala.
- sbt/sbt, this repository hosts modules that implement the build tool.
Other links
- Setup: Describes getting started with the latest binary release.
- FAQ: Explains how to get help and more.
- sbt/sbt-zero-seven: hosts sbt 0.7.7 and earlier versions
Issues and Pull Requests
Please read CONTRIBUTING carefully before opening a GitHub Issue or a pull request.
If you're looking for an idea for a contribution, issues labeled with good first issue or help wanted might be good starting points.
If you would like to ask questions about sbt, there's sbt channel on Scala Discord, but it would be good to gather questions on Stackoverflow.
license
See LICENSE.
Languages
Scala
94.5%
Java
3.1%
Shell
1.1%
Batchfile
0.9%
Roff
0.2%
Other
0.1%