Andreas Kling
e63cc38861
Shell: Use a Vector<char> for the main input buffer.
2019-05-07 01:01:50 +02:00
Andreas Kling
3ae75e04ec
date: Add "-u" argument for printing current Unix timestamp.
2019-05-04 16:50:36 +02:00
Andreas Kling
8b249bd09b
Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program.
2019-05-03 22:59:58 +02:00
Andreas Kling
2a65f0ee4f
strace: Allow "strace command" to trace a process from start to finish.
...
Tracing a specific pid is now done via "strace -p PID".
To ensure we don't miss any syscalls, we fork and have the child immediately
SIGSTOP itself. Then when the parent has set up the systrace() fd, we send
SIGCONT to the child which then execs the command. :^)
2019-05-02 15:51:39 +02:00
Andreas Kling
d3bd4fdcfe
sh: Log to debugger how long command took.
2019-05-02 02:22:28 +02:00
Andreas Kling
b204b77b29
sh: Remove debug spam during command launch.
2019-04-26 17:33:06 +02:00
Andreas Kling
d4a8e2930e
sh: Add a simple "export" command for setting environment variables.
2019-04-26 03:23:27 +02:00
Andreas Kling
c392c0d799
Userland: Add a simple /bin/tr program.
2019-04-26 00:57:37 +02:00
Andreas Kling
671dee9afa
Userland: Add a simple /bin/sort program.
2019-04-26 00:53:57 +02:00
Andreas Kling
b5a1ee1d3e
Userland: Add a simple /bin/head program.
2019-04-26 00:47:30 +02:00
Andreas Kling
96d4b701e6
sh: Make "cd" jump to the home directory. And also let's set $HOME.
...
Nobody else is setting $HOME right now, so we might as well do it here.
This should eventually be done by some sort of "login" program.
2019-04-25 23:09:21 +02:00
Andreas Kling
89e9aafbb5
sh: Support erasing a whole word with WERASE (^W).
2019-04-25 23:05:10 +02:00
Andreas Kling
04b7def6ab
sh: Add support for redirecting stdin and stdout with < and >.
...
This is certainly about time. The kernel has had all the necessary support
in place for months, and I just kept postponing working on the shell. :^)
2019-04-25 16:10:16 +02:00
Andreas Kling
df8e76a67c
cat: Just use fd 0 when no arguments are passed.
...
I'm not sure why it seemed necessary at some point to open /dev/stdin rather
than simply using the already-open fd 0.
2019-04-25 16:01:28 +02:00
Andreas Kling
e84faadb63
sh: Refactor command parsing into a separate class.
2019-04-25 14:34:25 +02:00
Andreas Kling
07de1147ad
sh: Add basic command piping support.
2019-04-25 14:13:36 +02:00
Andreas Kling
aa84e2fc64
fgrep: Don't repeat old incoming data if fgets() failed.
2019-04-25 14:07:17 +02:00
Andreas Kling
eadcf720c0
Userland: Add a simple /bin/echo program.
2019-04-25 04:42:09 +02:00
Andreas Kling
0c898e3c2c
Put assertions behind a DEBUG flag to make it easy to build without them.
2019-04-23 21:52:02 +02:00
Andreas Kling
91f561a417
touch: Newly created files were accidentally marked as FIFO's.
2019-04-23 17:04:12 +02:00
Andreas Kling
5c68929aa1
Kernel: Add a systrace() syscall and implement /bin/strace using it.
...
Calling systrace(pid) gives you a file descriptor with a stream of the
syscalls made by a peer process. The process must be owned by the same
UID who calls systrace(). :^)
2019-04-22 18:44:45 +02:00
Andreas Kling
57da00b731
Include Makefile.common in all other Makefiles.
2019-04-21 04:09:39 +02:00
Andreas Kling
5f63f8120c
Kernel: Remove "restorer" field from SignalActionData.
...
I was originally implementing signals by looking at some man page about
sigaction() to see how it works. It seems like the restorer thingy is
system-specific and not required by POSIX, so let's get rid of it.
2019-04-20 19:32:14 +02:00
Andreas Kling
5eedb22834
Sprinkle use of AK::Vector in various places.
...
Some of these are less helpful than others. Avoiding a bunch of mallocs
in the event loop wakeup code is definitely nice.
2019-04-20 14:02:19 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
87c4d2bc92
Userland: Add a /bin/basename program.
2019-04-15 13:57:09 +02:00
Nicolas Van Bossuyt
37c27e2e39
Userspace: gitignore binaries
2019-04-15 00:35:37 +02:00
Andreas Kling
adc91d92a3
Userland: Oops, that merge broke the build, just needed a few tweaks. :^)
2019-04-14 20:32:44 +02:00
Nicolas Van Bossuyt
40e710da3d
Userland: Maybe find is overkill
2019-04-14 20:15:29 +02:00
Nicolas Van Bossuyt
dfeeaff237
Userland: making the makefile smarter
2019-04-14 19:58:25 +02:00
VAN BOSSUYT Nicolas
12f2d1f2e8
Uptime: making the ouput prettier
...
Just like the -p option on linux
2019-04-14 19:10:24 +02:00
Andreas Kling
c0fe48635b
Kernel: Add /proc/uptime file (number of seconds since boot.)
...
Also added a simple /bin/uptime to pretty-print this information. :^)
2019-04-14 15:19:45 +02:00
Andreas Kling
5e0577a042
Introduce LibCore and move GElapsedTimer => CElapsedTimer.
...
I need a layer somewhere between AK (usable both by userspace and kernel)
and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
2019-04-10 16:14:44 +02:00
Andreas Kling
4ab0cd5d4c
LibGUI: Move frame painting from GFrame to StylePainter.
...
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00
Andreas Kling
313ac51832
LibGUI: Turn GTextBox into a wrapper around a single-line GTextEditor.
2019-04-10 03:08:29 +02:00
Andreas Kling
37ae00a4dd
Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.
2019-04-07 23:35:26 +02:00
Andreas Kling
5d72cf5a3f
LibGUI: Improve GFrame's look for Container shapes.
...
This is now starting to look like a proper container. Very nice :^)
2019-03-28 20:15:13 +01:00
Andreas Kling
f939fb7eb7
Userland: Add a simple GFrame testing window to guitest2.
2019-03-28 18:52:03 +01:00
Andreas Kling
9fa21fa585
LibGUI: Add a GPainter class that inherits from Painter.
...
This gets rid of the last little piece of LibGUI knowledge in Painter.
2019-03-28 17:19:56 +01:00
Andreas Kling
0058da734e
Kernel: Add Inode::truncate(size).
...
- Use this to implement the O_TRUNC open flag.
- Fix creat() to pass O_CREAT | O_TRUNC | O_WRONLY.
- Make sure we truncate wherever appropriate.
2019-03-27 16:42:30 +01:00
Andreas Kling
23bb276fcd
LibC: Run constructors on process startup.
...
Cooperate with the compiler to generate and execute the _init_array list
of constructor functions on userspace program statup. This took two days
to get working, my goodness. :^)
2019-03-27 12:48:21 +01:00
Andreas Kling
aef6030a80
LibC: Time-related POSIX compliance fixes.
2019-03-27 01:31:53 +01:00
Andreas Kling
7e54fdce99
QuickShow: Fill the window with white if the opened image has alpha.
2019-03-24 03:07:00 +01:00
Andreas Kling
d563dc0565
LibGUI: Add a setting to make GLabel stretch its icon.
...
Use this in QuickShow to allow arbitrarily scaling the opened image.
2019-03-22 04:20:48 +01:00
Andreas Kling
c3b0c1ba68
LibGUI: Add a GProgressBar widget.
2019-03-22 02:49:45 +01:00
Andreas Kling
e4dfd5a3a4
WindowServer: Support PNG wallpapers.
...
Fix up /bin/pape so it tells the WindowServer which wallpaper file to use.
2019-03-21 15:54:19 +01:00
Andreas Kling
0114c61cf1
Userland: Turn off double buffering in QuickShow.
...
Since this program is primarily used to display potentially huge but still
static images, let's not put extra strain on the system by double buffering.
2019-03-21 13:31:47 +01:00
Andreas Kling
65348e7dc1
PNGLoader: Support for color type 2 (RGB triplets) and multiple IDAT chunks.
2019-03-21 05:25:54 +01:00
Andreas Kling
42755e98cf
SharedGraphics: Implement a simple PNG decoder.
...
This is extremely unoptimized, but it does successfully load "folder32.png"
so it must be at least somewhat correct. :^)
2019-03-21 03:57:42 +01:00
Andreas Kling
4ea625e08b
Userland: Allow ping <hostname> :^)
2019-03-20 03:38:09 +01:00