SchOS/cmd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz ff7afa746e tty: arrow keys, backspace, and four terminals nobody was home on
Three things, all in the first minute of using a shell.

**Arrow keys corrupted the two keystrokes after them.** They arrive as single
keycodes -- KEY_UP is 0xE2 -- and were pushed into the input buffer exactly
like that. No terminal works that way, and 0xE2 is the worst possible byte to
have chosen: it is a UTF-8 lead byte for a three-byte character, so a reader
decoding UTF-8 swallowed the next two keys waiting for continuations that never
arrived. consoleintr() sends the DEC/xterm sequences now -- ESC[A, ESC[D,
ESC[5~ and the rest -- which every terminfo entry and every line editor already
knows. Not echoed: in canonical mode echoing them would move the cursor for
real, which was the other half of what "weird glitches" looked like.

**Then the end of the line vanished as you typed into it**, with the buffer
perfectly correct. One line in vt_putc(): backspace erased the cell it moved
onto. That is a line-discipline erase, not the BS control character -- a
program rubbing a character out sends `\b \b`, and the separation matters
because programs also use plain `\b` to go back. zsh does, on every mid-line
edit:

    echo alpha  \b\b  zha  \b\b

back two, rewrite the tail, back two again to park the cursor. Against a
destructive backspace that last pair deleted the `ha` it had just drawn.

`\b` moves and nothing else now, 0x7f is ignored as on a real terminal, and
consputc() spells its own erase out as `\b \b` as it already did for serial.
ESC[@, ESC[P and ESC[X went in alongside, because TERM=linux declares them.

**VT3 to VT6 were blank** because nothing ran on them. NVT is 6 and the kernel
made all six; only two had a shell, so Alt+F3 switched to a terminal that was
working perfectly and had nobody to talk to. Four more manifests.

Six shells starting at once is enough concurrency to expose an intermittent
fault in one of them -- one boot in five, a wild jump into .data that runs
until it writes to 0, which nothing catches because SchOS never sets EFER.NXE.
Three boots with two shells, none. Recorded rather than fixed: it is not caused
by the manifests, only made likelier by them.

Also: QEMU_NET forwards host 8080/8081/8000 to guest 80/8080/8000, so the httpd
is reachable from the machine running QEMU instead of being sealed behind NAT.
Verified end to end. And the greeting prints once again -- a replaced
supervisor was announcing a boot that had already happened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
2026-09-14 22:43:54 +02:00
..
chvt tty: AltGr+F1..F6 by default, and AltGr+-/+ to step 2026-09-13 13:22:01 +02:00
fbinfo hybrid: /dev/pci -- a driver can live outside the kernel now 2026-09-13 15:34:28 +02:00
httpd userland: 268 applets, an editor, names that resolve, and a web server 2026-09-14 19:24:55 +02:00
inputtest Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
ldlsd ldls: a second driver, and everything it found 2026-09-14 15:20:07 +02:00
netecho ldls: L4 was free after all, and the plan closes 2026-09-14 13:37:04 +02:00
nettest net: recvfrom says who sent it, and a datagram is delivered whole 2026-08-15 16:23:06 +02:00
pcitest hybrid: the driver is killed, and the driver comes back 2026-09-14 00:05:43 +02:00
ping net: the socket layer stops saying yes to things it did not do, and ping works 2026-09-12 17:14:35 +02:00
reflink schfs: the commit barrier, reflink, and attributes with an index over them 2026-08-15 16:02:02 +02:00
resolvconf boot: one line when it works, all of it when it does not 2026-09-14 21:19:50 +02:00
schattr schfs: the commit barrier, reflink, and attributes with an index over them 2026-08-15 16:02:02 +02:00
schdbg debugger: D5, the network transport -- and the plan closes 2026-09-14 15:33:53 +02:00
schdbgd debugger: D5, the network transport -- and the plan closes 2026-09-14 15:33:53 +02:00
schinit boot: one line when it works, all of it when it does not 2026-09-14 21:19:50 +02:00
schinitd tty: arrow keys, backspace, and four terminals nobody was home on 2026-09-14 22:43:54 +02:00
schmode hybrid: a modeset, from a process 2026-09-14 01:36:05 +02:00
shmtest Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
socktest sockets: a descriptor can cross between processes 2026-09-13 19:49:37 +02:00
vgpud errno: -1 is EPERM, and four places were saying it by accident 2026-09-14 22:12:28 +02:00