8f0e358360
libc: Add setuid, setgid, seteuid, setegid
2022-10-28 17:52:39 +02:00
17671fd435
libc: Implement getuid, geteuid, getgid, getegid
2022-10-28 17:24:28 +02:00
7d20c507b1
Kernel, libc, userspace: Implement command-line arguments (argv)
...
The only thing missing now is for sh to pass them on.
2022-10-26 18:57:06 +02:00
af452e2b2a
Kernel, libc: Add dup2()
2022-10-25 18:58:06 +02:00
0dec5f7bad
libc: Add dummy getcwd()
2022-10-24 17:05:28 +02:00
bef9158450
Kernel, libc: Add isatty() and F_ISTTY to fcntl()
2022-10-21 18:34:31 +02:00
f7cf395f71
Kernel, libc: Add access()
2022-10-20 19:03:24 +02:00
aebd860947
libc: Add stdin
...
Aka keyboard :)
2022-10-19 20:43:04 +02:00
01564cb905
libc: Adapt libc to getprocid() + add getppid()
2022-10-18 17:36:33 +02:00
8b17065718
Kernel, libc: Rename gettid() to getpid() and move it to unistd.h
2022-10-17 20:08:44 +02:00
e7522c21ca
libc: Document fork()
2022-10-17 18:56:04 +02:00
6507146c60
libc: Add Luna-specific limits
2022-10-15 14:31:55 +02:00
1e86acd4c0
libc: Implement fcntl(F_DUPFD) and dup()
2022-10-15 11:16:34 +02:00
8398b2e2e4
libc: Change bits/macros.h to use a __lc_ prefix for internal macros
...
That way, we don't pollute user programs with our own 'noreturn' and 'deprecated' macros
2022-10-15 09:52:37 +02:00
d5bc87099f
libc: #define STDOUT_FILENO and STDERR_FILENO
...
Still missing stdin >.<
2022-10-14 21:24:18 +02:00
743aedcd49
libc: Implement atexit() and _exit()
...
exit() now calls registered handlers before calling _exit().
And initialize_libc() can now register a handler to close stdout and stderr on program termination!! :)
2022-10-12 20:41:55 +02:00
531afc3d6f
libc: Add support for the new exec() system call
...
execv() is a temporary wrapper that ignores the second parameter, while execve() and execvp() still error out.
2022-10-12 17:45:58 +02:00
4a5db1dca7
libc: Add lseek()
2022-10-12 15:37:29 +02:00
38e87d8f8f
libc: Document the functions in unistd.h
2022-10-12 11:02:18 +02:00
12cf37d0a7
Kernel/syscalls: Modify sys_write to accept a file descriptor and write to it
...
Previously, sys_write only wrote to the tty. Now, it uses the VFS interface, as it should.
2022-10-11 21:06:12 +02:00
9e0bd39964
libc: Implement wrappers for sys_{open,read,write}
...
read() and close() are in unistd.h, but open() in fnctl.h.
I thought only the definitions for O_SOMETHING were in fnctl.h, but it is as it is.
Don't know why, but let's not anger the Unix gods.
The FILE* C API is pending as well.
2022-10-10 20:45:26 +02:00
ae95a528f2
Make function stubs in libc loudly abort instead of silently failing
2022-10-02 18:10:53 +02:00
3c6c94adda
Add a proper syscall() function to unistd.h
2022-10-02 17:02:15 +02:00
fcf5923cc0
WIP: Add a C Library, let's try to compile a Hosted GCC cross-compiler using this!
2022-10-01 20:59:22 +02:00