Age | Commit message (Collapse) | Author |
|
|
|
|
|
We were getting a little overly memey in some places, so let's scale
things back to business-casual.
Informal language is fine in comments, commits and debug logs,
but let's keep the runtime nice and presentable. :^)
|
|
* Port it to Core::ArgsParser - even though it doesn't support any options
at the moment, it's nice to handle --help and reject other options;
* Accept "-" to mean stdin;
* Make sure to write out all data that we read, looping if needed;
* Detect Useless Uses of Cat and print a cute warning :^)
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
|
|
This is roughly twice as fast as the old 4 KB buffer size. We still
don't go nearly as fast as "cp", since we don't ftruncate() up front
like "cp" does.
|
|
I made the mistake of starting the initial for loop at i=0 when it
should have started at 1. argv[0] is the program name, argv[1] is an
argument.
|
|
Now concatenates multiple files at once with a for loop iterating
through a vector of file arguments.
|
|
|
|
Error messages should go to stderr so they don't get mixed in with the
program's output. Also added a check for the return value of write().
|
|
I'm not sure why it seemed necessary at some point to open /dev/stdin rather
than simply using the already-open fd 0.
|
|
Also change /bin/cat to open /dev/stdin if no arguments are provided.
|
|
|
|
Plumb it all the way to the VirtualConsole. Also fix /bin/cat to write()
the whole chunks we get from read() directly to stdout.
|
|
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)
|
|
Interrupting children of sh now always works with ^C :^)
|
|
For testing, I made cat put itself into a new process group.
This should eventually be done by sh between fork() and exec().
|
|
- sys$readlink + readlink()
- Add a /proc/PID/exe symlink to the process's executable.
- Print symlink contents in ls output.
- Some work on plumbing options into VFS::open().
|
|
I also added a generator cache to FileHandle. This way, multiple
reads to a generated file (i.e in a synthfs) can transparently
handle multiple calls to read() without the contents changing
between calls.
The cache is discarded at EOF (or when the FileHandle is destroyed.)
|
|
It walks the stack and identifies anything that looks like a kernel symbol.
This could be a lot more sophisticated.
|
|
Celebrate the new functionality with a simple /bin/cat implementation. :^)
|