Andreas Kling
0669ef8977
Kernel: Writing to a slave PTY should yield EIO if the master is closed.
2019-02-05 13:09:01 +01:00
Andreas Kling
2a0700af9a
Kernel: Closing a MasterPTY should generate a TTY hangup.
2019-02-05 12:55:19 +01:00
Andreas Kling
8bb18fdc56
Kernel: Get rid of Unix namespace.
...
This is no longer needed as the Kernel can stand on its own legs now
and there won't be any conflict with host system data types.
2019-01-23 06:57:00 +01:00
Andreas Kling
754037874c
Move VFS sources into Kernel/.
2019-01-23 05:14:00 +01:00
Andreas Kling
bd3e77cc16
Pass the process to CharacterDevice::read/write.
...
This is much nicer than grabbing directly at 'current' inside a read().
2019-01-16 00:20:38 +01:00
Andreas Kling
08bfe518f9
Rename CharacterDevice::has_data_available_for_reading() -> can_read().
2019-01-16 00:10:13 +01:00
Andreas Kling
e452303c66
Allow character devices to block write attempts until there is more space.
2019-01-15 09:17:22 +01:00
Andreas Kling
b0e3f73375
Start refactoring the windowing system to use an event loop.
...
Userspace programs can now open /dev/gui_events and read a stream of GUI_Event
structs one at a time.
I was stuck on a stupid problem where we'd reenter Scheduler::yield() due to
having one of the has_data_available_for_reading() implementations using locks.
2019-01-14 14:42:49 +01:00
Andreas Kling
4f6438ec66
VirtualConsole: Support the 'A' and 'D' CSI sequences.
...
This makes backspace work correctly when line editing with bash-2.05b.
2018-12-07 01:19:02 +01:00
Andreas Kling
bbfae19238
Move DoubleBuffer to its own files.
2018-12-03 01:51:44 +01:00
Andreas Kling
f6e27c2abe
More coding style changes.
2018-12-03 00:39:25 +01:00
Andreas Kling
85b886c2e0
Make it possible to build the Kernel on a macOS host.
...
It still requires an ELF compiler and linker, but at least it builds.
I need to get rid of the "Unix" namespace. This does a lot of that.
2018-12-02 23:34:50 +01:00
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