Andreas Kling
ac7a60225e
Add TIOCGWINSZ ioctl so userland can determine terminal geometry.
...
(Don't) use this to implement short-form output in ls.
I'm too tired to make a nice column formatting algorithm.
I just wanted something concise when I type "ls".
2018-11-29 03:45:23 +01:00
Andreas Kling
a788e85c09
Refactor TTY signal generation a bit.
...
We now respect the VINTR and VQUIT control characters in the termios.
2018-11-16 20:18:58 +01:00
Andreas Kling
4e2c2b9748
Minor TTY tweak.
2018-11-16 18:12:22 +01:00
Andreas Kling
d2046e79cf
Add a DoubleBuffer thingy to allow TTY read/write to be interleaved.
...
I feel like this concept might be useful in more places. It's very naive
right now and uses dynamically growing buffers. It should really use static
size buffers and never kmalloc().
2018-11-16 17:57:00 +01:00
Andreas Kling
c99f8af66d
Add ioctl() and reimplement tcsetpgrp/tcsetpgrp as ioctls.
2018-11-16 13:13:50 +01:00
Andreas Kling
1cf20a2fe2
Some minor termios debugging output.
2018-11-12 12:27:28 +01:00
Andreas Kling
d5d45d1088
Rage hacking to get bash to run. It finally runs. So cool! :^)
2018-11-11 15:38:07 +01:00
Andreas Kling
da3857b0c2
Add some simple write buffering to LibC's stdio.
...
Plumb it all the way to the VirtualConsole. Also fix /bin/cat to write()
the whole chunks we get from read() directly to stdout.
2018-11-08 01:23:47 +01:00
Andreas Kling
71bffa9864
Fix whiny build.
2018-11-07 16:38:45 +01:00
Andreas Kling
10b666f69a
Basic ^C interrupt implementation.
...
For testing, I made cat put itself into a new process group.
This should eventually be done by sh between fork() and exec().
2018-11-02 14:06:48 +01:00
Andreas Kling
621217ffeb
Add tcsetpgrp()+tcgetpgrp().
...
One more step on the path to being able to ^C a runaway process. :^)
2018-11-02 13:14:25 +01:00
Andreas Kling
00c21d1590
Add sys$ttyname_r and ttyname_r() + ttyname().
...
And print a greeting when sh starts up so we know which TTY we're on.
2018-10-30 22:03:02 +01:00
Andreas Kling
7a7956a595
Virtual consoles kinda work!
...
We now make three VirtualConsoles at boot: tty0, tty1, and tty2.
We launch an instance of /bin/sh in each one.
You switch between them with Alt+1/2/3
How very very cool :^)
2018-10-30 15:33:37 +01:00
Andreas Kling
68739dc43e
Start working on virtual consoles/TTYs.
...
This is a mess right now, but I'd rather commit as I go.
2018-10-30 13:59:29 +01:00