Whether troupe has a terminal is asked of Burrito's launcher on Linux and macOS, and on Windows Ctrl-C ends the commands that only print¶
TUI decision 130 · accepted · 2026-09-27 · issue #231
- The launcher's standard output is the one the person sees. On Linux and macOS
Burrito's launcher gives the VM a pipe for standard output and copies it to its
own (
erlang_launcher.zig, so thattroupe … | headgoing away ends the VM too). So the VM's own standard output was never a terminal there, and the guard of 0.5.1 (Runner.needs_terminal/2) refused plaintroupein a real terminal for everyone, as if it had been drawn into a file;troupe configasked nothing either. Shown with the v0.6.0-beta Linux asset and with a build of the chunk's tip, under a pty and underscript:troupe: stdout is not a terminal, the VM's descriptor 1 a pipe and the launcher's/dev/pts/4.Troupe.CLI.Terminalasks the launcher, the VM's parent:/proc/<pid>/fd/1on Linux,lsofelsewhere, and a standard output it cannot read counts as a terminal, since refusing on a guess is what went wrong. A file, a pipe or no terminal at all is still refused. Standard input the launcher passes on as it is, and on Windows it hands the VM its console: there the VM's own answers stand. - Ctrl-C at a command that only prints, on Windows. Under
+BcCtrl-C is a key, andtroupe run --headless,troupe daemon run,troupe loginand the others that wait on a daemon or a network read none, so the key waited for the shell, which read it into its next line.Troupe.CLI.Interruptreads the console while they run (Runner.interruptible?/1lists them), through the same reader the terminal UI uses (ExRatatui.poll_event/1): every key typed is taken off, and Ctrl-C prints^Cand ends the command with 130. The terminal UI and a question read Ctrl-C themselves and are not watched. troupe daemonruns the daemon under the reaper on Windows, in a job that ends with troupe however troupe ends. Started through a batch file, the daemon got no signal of its own, and without the job it went on in the console after troupe had gone. Elsewhere Ctrl-C is the terminal's signal, reaches the daemon too, and nothing changes.- What is left: Ctrl-Break opens the VM's break menu. It is a signal whatever
the console's mode, and ERTS gives no flag that makes it end the VM
(
sys_interrupt.c,erl_init.c): under+Bcit is still the break handler's,+Biignores it and leaves the VM behind the launcher that died of it, and+Bdis not read on Windows at all. A second Ctrl-Break ends the VM. Ending it on the first takes a console control handler inside the VM, a NIF of our own.
Governs: clients/tui/lib/troupe/cli/daemon.ex, clients/tui/lib/troupe/cli/interrupt.ex, clients/tui/lib/troupe/cli/terminal.ex