Age | Commit message (Collapse) | Author |
|
|
|
It walks all the live Inode objects and flushes pending metadata changes
wherever needed.
This could be optimized by keeping a separate list of dirty Inodes,
but let's not get ahead of ourselves.
|
|
This synchronous approach to inodes is silly, obviously. I need to rework
it so that the in-memory CoreInode object is the canonical inode, and then
we just need a sync() that flushes pending changes to disk.
|
|
This avoids the annoying situation that occurs when a spawned process
messes with the termios and then doesn't exit cleanly.
|
|
|
|
|
|
|
|
(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".
|
|
Added a /bin/mkdir that makes directories. How very neat :^)
There are various limitations because of missing functionality.
|
|
|
|
|
|
Pass the file name in a stack-allocated buffer instead of using an AK::String
when iterating directories. This dramatically reduces the amount of cycles
spent traversing the filesystem.
|
|
It's now possible to do this in bash:
cat kernel.map | fgrep List
This is very cool! :^)
|
|
|
|
|
|
|
|
After I made stdio buffered, we were dropping anything unflushed on exit.
Since /bin/clear just prints out some escape sequences without a newline,
the entire buffer was being discarded.
Also add VirtualConsole::clear() that handles clearing of background VC's.
|
|
|
|
|
|
|
|
|
|
This way, if anyone tries to map an already mapped file, we share the VMO.
|
|
All right, we can now mmap() a file and it gets magically paged in from fs
in response to an NP page fault. This is really cool :^)
I need to refactor this to support sharing of read-only file-backed pages,
but it's cool to just have something working.
|
|
|
|
Plumb it all the way to the VirtualConsole. Also fix /bin/cat to write()
the whole chunks we get from read() directly to stdout.
|
|
For dead orphans, the scheduler calls reap().
|
|
This is dirty but pretty cool! If we have a pending, unmasked signal for
a process that's blocked inside the kernel, we set up alternate stacks
for that process and unblock it to execute the signal handler.
A slightly different return trampoline is used here: since we need to
get back into the kernel, a dedicated syscall is used (sys$sigreturn.)
This restores the TSS contents of the process to the state it was in
while we were originally blocking in the kernel.
NOTE: There's currently only one "kernel resume TSS" so signal nesting
definitely won't work.
|
|
Ugh, how am I going to dispatch signals to processes in the kernel?
|
|
Processes are either alive (with many substates), dead or forgiven.
A dead process is forgiven when the parent waitpid()s on it.
Dead orphans are also forgiven.
There's a lot of work to be done around this.
|
|
Also teach /bin/id to print the user's supplemental groups.
|
|
|
|
|
|
It only works for sending a signal to a process that's in userspace code.
We implement reception by synthesizing a PUSHA+PUSHF in the receiving process
(operating on values in the TSS.)
The TSS CS:EIP is then rerouted to the signal handler and a tiny return
trampoline is constructed in a dedicated region in the receiving process.
Also hacked up /bin/kill to be able to send arbitrary signals (kill -N PID)
|
|
It's just a simple struct { ref_count, paddr }.
This will allow me to implement lazy zeroing and COW pages.
|
|
This is so cool! :^) Now you'll crash if you try to write into your
.text or .rodata segments.
|
|
Interrupting children of sh now always works with ^C :^)
|
|
It's really crufty, but it basically works!
|
|
This is quite cool! The syscall entry point plumbs the register dump
down to sys$fork(), which uses it to set up the child process's TSS
in order to resume execution right after the int 0x80 fork() call. :^)
This works pretty well, although there is some problem with the kernel
alias mappings used to clone the parent process's regions. If I disable
the MM::release_page_directory() code, there's no problem. Probably there's
a premature freeing of a physical page somehow.
|
|
For testing, I made cat put itself into a new process group.
This should eventually be done by sh between fork() and exec().
|
|
One more step on the path to being able to ^C a runaway process. :^)
|
|
|
|
Also use a ProcessPagingScope instead of region aliasing to implement
create-process ELF loading.
|
|
|
|
Also fix ttyname() syscall to include "/dev/" in the name.
|
|
This forces serialization of accesses. This driver needs to be redesigned.
|
|
Also add a little /etc/passwd database. There's just me in there.
|
|
|
|
|
|
|
|
All it can do right now is send SIGKILL which just murders the target task.
|