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
de4604ac95
Finally hook up the mkdir code to a syscall.
...
Added a /bin/mkdir that makes directories. How very neat :^)
There are various limitations because of missing functionality.
2018-11-18 15:02:16 +01:00
Andreas Kling
303577df16
Various stubs while trying to get an old coreutils to build.
2018-11-17 15:56:09 +01:00
Andreas Kling
9d05f6b7a7
Make bash-2.05b build with minimal changes.
...
This is really neat. :^)
2018-11-17 00:14:07 +01:00
Andreas Kling
084287ca45
Reimplement tcsetattr/tcgetattr as ioctls.
2018-11-16 15:41:48 +01:00
Andreas Kling
c99f8af66d
Add ioctl() and reimplement tcsetpgrp/tcsetpgrp as ioctls.
2018-11-16 13:13:50 +01:00
Andreas Kling
6a0a2c9ab4
Some improvements to signals.
...
- Add sigprocmask() and sigpending().
- Forked children inherit signal dispositions and masks.
- Exec clears signal dispositions and masks.
2018-11-10 23:30:41 +01:00
Andreas Kling
4914f3b837
Build LibC and Userland with clang as well.
2018-11-09 14:29:00 +01:00
Andreas Kling
7b3b5f745f
Move <utsname.h> to <sys/utsname.h> for correctness.
2018-11-09 10:24:41 +01:00
Andreas Kling
d7a41579e5
Miscellaneous compat work while seeing if GNU coreutils would build.
2018-11-07 10:23:16 +01:00
Andreas Kling
e5e0bffd76
Add getwd().
2018-11-06 15:59:57 +01:00
Andreas Kling
b2d23f83ab
Add umask().
2018-11-06 13:47:56 +01:00
Andreas Kling
153ea704af
Add some basic signal support.
...
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)
2018-11-06 10:56:41 +01:00
Andreas Kling
9f2b9c82bf
More work towards getting bash to build.
...
Implemented some syscalls: dup(), dup2(), getdtablesize().
FileHandle is now a retainable, since that's needed for dup()'ed fd's.
I didn't really test any of this beyond a basic smoke check.
2018-11-05 19:01:59 +01:00
Andreas Kling
e76312ab63
Lots of minor compat stuff while seeing if bash would build.
...
We're quite far from bash building, but we'll get there eventually!
2018-11-05 16:40:48 +01:00
Andreas Kling
8039a20611
Tiny LibC things.
2018-11-05 14:54:11 +01:00
Andreas Kling
9bd09454e3
Mark LibC's assertion faillure helper with __NORETURN.
2018-11-04 13:13:57 +01:00
Andreas Kling
9886b27d9c
Add getpwent() family of functions to LibC.
...
Also add a little /etc/passwd database. There's just me in there.
2018-10-31 19:54:25 +01:00
Andreas Kling
2fdc7c2c60
Use ALWAYS_INLINE for ctype inlines.
2018-10-31 15:53:11 +01:00
Andreas Kling
bb90c8ecab
A bunch of LibC boilerplate stuff added while trying to get figlet to build.
2018-10-31 02:09:11 +01:00