Do not treat quit-key bytes as commands for non-interactive stdin #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding:
The input forwarding loop always interprets
quit_key, even when stdin is not a TTY and raw terminal mode was never enabled.Problem:
isatty, butstartForwardingInputalways runs.forwardInputLoopscans every input byte foractive_quit_keyand callsstopVirtualMachineFromConsole.Impact:
With redirected or piped stdin, a literal byte
0x1dis consumed as a host escape instead of being delivered to the guest. This makes automation and binary/fixture input lossy and surprising.Suggested fix:
Only enable escape-key handling for interactive TTY input, or add an explicit way to disable the escape key. Non-interactive input should be forwarded byte-for-byte and should close the guest input pipe on EOF.
Relevant code:
src/vmz.zig: raw terminal setup and input forwarding loop.