Commit Graph

250 Commits

Author SHA1 Message Date
77022abafd
libc: Implement ungetc
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-22 11:25:20 +02:00
19b4aa9f81
libc: Flush buffers before dealing with file positions 2023-07-22 11:19:48 +02:00
420270ebd4
libc: Implement read buffering =D 2023-07-22 11:17:51 +02:00
d60ad184f1
libc: A bit of nice refactoring 2023-07-22 10:58:34 +02:00
a3ed950be8
libc: Basic write buffers
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-22 00:04:27 +02:00
cfb0ead2d9
libc: Flush all open streams on exit
This does nothing for now, but prepares for buffering.
2023-07-21 22:56:03 +02:00
de6fe7f7c2
kernel+libc+sh: Make the TTY device actually follow termios rules
All checks were successful
continuous-integration/drone/push Build is passing
Like, so much more termios compatibility!
2023-07-13 20:33:20 +02:00
efd5bae7a5
kernel: Implement querying the terminal window size
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-12 22:09:28 +02:00
546d900454
libc+apps: Start implementing POSIX-compliant termios.h wrappers around tty ioctls
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 19:23:06 +02:00
2951d6d112
libc+tests: Check for manual modifications of environ
All checks were successful
continuous-integration/drone/push Build is passing
Closes #31.
2023-07-12 16:25:06 +02:00
81e1fdf81e
kernel+libc+login+sh+su: Implement foreground and background process groups in the default console
All checks were successful
continuous-integration/drone/push Build is passing
Also, the console sends SIGINT to the foreground process group when ^C is pressed!
2023-07-12 13:49:37 +02:00
71ff763dd9
kernel+libc: Add the SIGTTIN and SIGTTOU signals 2023-07-12 13:45:36 +02:00
b64093dee5
kernel+libc: Implement getpgid() 2023-07-12 13:44:25 +02:00
1091798195
libc: Add stub memory.h header for legacy programs
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 11:24:54 +02:00
9cf35f761f
libc: Fix another conversion error
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-11 12:45:55 +02:00
a51fb6a428
libc: Fix conversion error in isatty()
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-11 12:45:08 +02:00
69f9701097
kernel+libc: Implement isatty()
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-11 12:05:09 +02:00
7328cfe734
kernel: Add basic process groups
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-11 11:51:07 +02:00
f7e8fd9cb8
libc: Add octal specifiers to inttypes.h 2023-07-11 11:49:27 +02:00
0fed45d1c6
libc: Implement _exit()
Apparently, I implemented _Exit in stdlib.h but forgot to add _exit to unistd.h...
2023-07-11 11:49:10 +02:00
86d14e0d0e
kernel+libc: Add the SA_NODEFER and SA_RESETHAND flags for sigaction()
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-10 21:54:04 +02:00
237184a8bf
libc+sh: Implement strsignal and use it in the shell
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:39:22 +02:00
e0b5acb2ab
libc: Make struct sigaction C-compatible
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:19:43 +02:00
66365e15a7
libc: Block and ignore appropriate signals in system()
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 21:17:56 +02:00
4a5947e10e
libc: Implement signal() 2023-07-10 21:17:25 +02:00
3df40beaf2
libc: Rewrite abort() using the new signals
Some checks failed
continuous-integration/drone/pr Build is failing
2023-07-10 21:08:23 +02:00
8066e8f1d8
kernel+libc: Implement sigprocmask() and friends
Some checks failed
continuous-integration/drone/pr Build is failing
2023-07-10 21:01:59 +02:00
60d68b74e1
kernel: Define a good set of default signals
Most of these have POSIX-defined numbers.
2023-07-10 20:30:37 +02:00
cde467ee46
kernel: Support returning termination signals from waitpid
All checks were successful
continuous-integration/drone/pr Build is passing
2023-07-10 20:16:06 +02:00
15d6aae701
kernel+libc: Implement basic signals 2023-07-10 19:46:57 +02:00
15199a2366
libluna+libc: Implement memchr() and strstr()
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-10 15:30:05 +02:00
a9460469d9
kernel+libc+apps: Add a source parameter to the mount() system call 2023-06-25 20:35:35 +02:00
d50ea76bdc
libc: Make tmpfile() create files in /tmp's filesystem
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 11:52:38 +02:00
f22689fcf5
libc: Add stubs for fflush() and ungetc()
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 10:48:02 +02:00
6bfc7483bc
libc: Add a definition for FILENAME_MAX 2023-06-19 10:47:43 +02:00
acfad51ac0
libc: Add freopen() 2023-06-19 10:46:08 +02:00
795b0ca8d4
libc/scanf: Some refactoring
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 01:05:32 +02:00
55d147841f
libc+tests: Add type modifiers and integer conversion specifiers to scanf() 2023-06-19 00:59:42 +02:00
8c2348c425
libc/scanf: Skip whitespace before %%
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 23:51:44 +02:00
25e9187826
libc+tests: Add basic support for the scanf family of functions
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 23:44:30 +02:00
e10cc2d954
libc: Add the internal TRY_OR_SET_ERRNO macro
All checks were successful
continuous-integration/drone/push Build is passing
Similar mechanism to TRY(), but propagating C-like errors instead of Results on failure.
2023-06-03 20:20:01 +02:00
6b4d41529e
libc: Fix execvp() calling the shell after an ENOEXEC
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-03 17:00:24 +02:00
8bcec00a9d
kernel: Change the timer subsystem to use timespecs natively
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-03 13:15:10 +02:00
d2334a67dd
apps: Add mktemp
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-03 12:15:57 +02:00
cc72a1655d
libc+libluna: Move libluna hooks out of libc and into a central place in libluna
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-03 11:18:52 +02:00
dcb8ab569a
libc: Add basic sys/param.h for programs that want it
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-31 22:15:22 +02:00
d467f6257d
libc: Define EXIT_* macros and strto(u)ll in stdlib.h 2023-05-31 22:15:05 +02:00
5c68d50070
libc: Add a very bare-bones locale.h 2023-05-31 22:12:50 +02:00
d572d56460
libc: Add dummy time fields to struct stat
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-27 12:22:06 +02:00
18115ca04a
libc: Add alloca.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-27 12:11:51 +02:00
8d90d146b2
libc: Fix including sys/time.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-27 12:06:00 +02:00
88d1da59e8
kernel+libc: Add access()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-27 12:04:27 +02:00
bd8aaa917f
kernel+libc+ln: Add support for userspace hard link creation
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-27 11:32:40 +02:00
b0506bf88f
kernel: Add umask
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-26 22:27:49 +02:00
62e14e7580
kernel+libos+apps: Support block devices and disallow seeking character devices or pipes
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-26 20:27:47 +02:00
84c1871d30
libc: Check if a shell is available if system()'s command argument is NULL 2023-05-26 17:27:37 +02:00
3a51807fa6
kernel+stat: Handle pipes correctly in stat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-23 20:54:25 +02:00
1094042a7d
kernel: Implement st_dev and st_rdev
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-23 20:45:24 +02:00
1a6ad11462
kernel+libc+libos+ls: Add readlink()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-23 15:42:38 +02:00
cb205c851c
libc: Add symlink(), symlinkat(), and lstat() 2023-05-20 21:49:25 +02:00
67a9d130e2
kernel: Add initial support for symbolic links :D 2023-05-20 21:49:24 +02:00
9bb5371e8c
libluna+libc: Add strtok_r() 2023-05-20 16:37:07 +02:00
47d505dcbb
libc: Add getline() and getdelim()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 15:36:30 +02:00
6de90b3c93
libc: Add getrusage() 2023-05-20 12:48:17 +02:00
01111442d3
kernel: Add the getrusage() system call 2023-05-20 12:48:07 +02:00
a7c6163e7c
libc: Add gettimeofday() 2023-05-20 12:05:22 +02:00
dc169124cc
libc: Add fchown, fchmod, and some POSIX feature test macros
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-19 19:59:20 +02:00
1506331872
kernel+libc: Add the pstat() system call
Luna-specific, but I like it.
2023-05-18 21:48:47 +02:00
0dbfbe6395
libc+apps: Avoid calling endpwent() and endgrent() after every call to get{pw,gr}{nam,uid,gid} 2023-05-18 21:47:46 +02:00
84bed3ceb3
kernel+libc: Remove mknod()
All checks were successful
continuous-integration/drone/push Build is passing
Now that we automatically create files in /dev, mknod() is not needed anymore.
2023-05-18 19:42:14 +02:00
1f4c4928cc
kernel+libc+apps: Add mount and umount syscalls, libc wrappers, and utilities
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-17 20:30:15 +02:00
18130847c1
libc: Fix some environment-related bugs 2023-05-11 20:09:46 +02:00
411c6c40cd
kernel: Add the fchmodat() and fchownat() system calls
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 19:49:03 +02:00
4a3a92e9d4
libc: Move chmod from unistd.h to sys/stat.h
All checks were successful
continuous-integration/drone/push Build is passing
Apparently that's where it's supposed to be.
2023-05-11 19:40:34 +02:00
efc6d03f23
kernel+libc: Add support for unnamed pipes
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-10 22:48:31 +02:00
1a2fce5316
kernel+libc: Add the O_TMPFILE open flag and the tmpfile() function
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-09 22:04:34 +02:00
77560bbc3e
kernel+tools: Allow loading files with different owners + add a more dynamic install script
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-06 12:11:35 +02:00
d7fee26aa2
initrd+libc: Add /etc/group and grp.h 2023-05-06 12:01:47 +02:00
349ba0acb1
libc: Add syscall wrappers for unlinkat() and openat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-05 18:50:35 +02:00
58eb2d7703
libc: Print failed assertions to stderr instead of stdout
All checks were successful
continuous-integration/drone/push Build is passing
This removes two FIXMEs from the time there was no stderr.
2023-05-04 16:37:13 +02:00
1215c38d75
libc: Add mkdtemp() and mkstemp()
All checks were successful
continuous-integration/drone/push Build is passing
No mktemp() though, as it has race conditions and was removed in POSIX.1-2008.
2023-05-03 16:43:30 +02:00
a0b45a51de
libc: Add rand() + srand()
All checks were successful
continuous-integration/drone/push Build is passing
Very basic random number generator, but that's what rand() is.
If you want secure numbers then use arc4random() or something idk
2023-05-02 21:20:24 +02:00
3628464284
libc: Fix some naming inconsistencies 2023-05-02 20:56:28 +02:00
d1801d484c
libc: Add qsort() 2023-05-02 20:56:27 +02:00
0fad179485
apps+libc+libos: Remove _LUNA_SYSTEM_ERROR_EXTENSIONS and reorder headers
All checks were successful
continuous-integration/drone/push Build is passing
libluna/libos headers can now go after errno.h, so there's no reason to keep them separate.
2023-05-02 10:51:53 +02:00
052ae4902e
libluna: Remove EFIXME and make others declare error_string() and error_name()
Closes #26.
2023-05-02 10:51:53 +02:00
2572d5b238
libc: Add wrapper for the fstatat() system call 2023-05-01 20:00:43 +02:00
458e0a87cc
libc: Fix S_IS* macros 2023-05-01 20:00:10 +02:00
7fbc644753
libc: Add clearenv
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 19:06:31 +02:00
967758d464
libc: Implement setenv() and unsetenv()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-30 14:46:34 +02:00
ac4bbd135b
libos: Add Directory::list()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 22:41:44 +02:00
3e277b5d6f
libos: Introduce os::Directory 2023-04-28 21:16:43 +02:00
97e9fceaa4
kernel+libc: Add dup2()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-25 20:37:30 +02:00
188a97cf54
libc: Add execlp
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-25 20:25:51 +02:00
89fd57dea4
libc: Propagate all errors in execl() and execvpe() + add execle().
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-25 17:43:11 +02:00
403b0f6b94
kernel+libc+init: Add a way to modify the system hostname
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-24 21:20:44 +02:00
cfb4baab4b
apps: Add uname
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-24 21:02:04 +02:00
9eab0886b6
kernel+libc: Add uname()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-24 20:34:44 +02:00
4f6e020196
kernel+libc: Add framebuffer ioctls
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-21 18:25:53 +02:00
02f8a50b9d
kernel: Replace unlink() with unlinkat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 19:36:29 +02:00