fix(session): recheck a taken exit's child and commit a launch only on a whole go line

This commit is contained in:
Kurt Himebauch committed 2026-11-27 19:03:38 -05:00
1 parent 2ba290c2f1
commit 6f42e1cf1a
5 files changed
+35 -11

No files matched your search

@@ -652,13 +652,15 @@ object GuestWorkers {
out.flush()
answered = true
client.soTimeout = ACK_TIMEOUT_MS
// the whole line: a hook whose write stopped short treats it as failed and runs the program itself
val line = StringBuilder()
while (true) {
var ended = false
while (!ended) {
val c = input.read()
if (c < 0 || c == '\n'.code) break
line.append(c.toChar())
if (c < 0) break
if (c == '\n'.code) ended = true else line.append(c.toChar())
}
line.toString() == "go"
ended && line.toString() == "go"
}.getOrDefault(false)
}
handedOver = true