Commit Graph

347 Commits

Author SHA1 Message Date
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
015419b8f5
kernel: Generate signals when children exit / when faults occur
Userspace can now catch segfaults!
2023-07-10 20:49:22 +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
16b0531d42
kernel+apps+base+tools: Use Ext2 for the root partition file system
All checks were successful
continuous-integration/drone/push Build is passing
init is now split into two parts: preinit, which lives in the initrd and prepares the root file system for init,
and the actual /usr/bin/init, which lives in the root partition and starts services and reaps zombies.

The kernel now looks for /bin/preinit instead of /bin/init as the executable for the init process.

All configuration files in initrd/etc have been moved to base/etc. (The plan is to have only moon and preinit in the initrd.)

Since the current Ext2 implementation is read-only (and it's on a CDROM so it would be read-only anyways),
/home/selene is a tmpfs (as well as /tmp), to allow for a writable home directory.

The system is slower now, but that's to expect since the Ext2 code doesn't use caching and the ATA code still uses PIO.
2023-07-10 13:05:06 +02:00
5c9503ac71
libos+cp: Add prompt functionality
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 18:30:39 +02:00
6d9ba8deb4
libos+apps: Make the vector argument more flexible
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 16:44:02 +02:00
f0a7098470
apps: Add cp
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-02 16:38:24 +02:00
2aa7056e11
mount: Put the source argument first 2023-06-25 20:35:36 +02:00
a9460469d9
kernel+libc+apps: Add a source parameter to the mount() system call 2023-06-25 20:35:35 +02:00
b4a6e4d56d
libluna/PathParser: Make dirname() and basename() static functions
All checks were successful
continuous-integration/drone/push Build is passing
This avoids creating a PathParser to use them, which allocates memory that won't be used.
2023-06-19 11:21:58 +02:00
2f08e0f5b0
libos: Make long value arguments use '=' and make value arguments' values always required
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 20:58:54 +02:00
e79d4297ea
kernel: Make the root inode be a mountpoint as well + add pivot_root()
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 17:27:22 +02:00
e4e501ecfe
libos: Add Process::wait()
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-09 23:12:31 +02:00
5f5b58a2c0
apps: Add a syscall fuzzer
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-08 19:58:00 +02:00
6ad7491300
sh: Skip comments (and shebangs!) 2023-06-03 16:59:18 +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
0540879959
init+initrd: Create /tmp and mount it on boot 2023-06-03 11:34:53 +02:00
ff952cfe16
kernel+init: Let userspace control devfs mountpoints
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-02 21:45:31 +02:00
d40654a00c
libos+ls: Allow calling ArgumentParser::short_usage() directly
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-28 21:57:04 +02:00
069f1c0f97
ls: Sort displayed entries 2023-05-28 21:51:50 +02:00
e864ef2d36
libos: Add a way to also list entry sizes, modes and mtimes 2023-05-28 21:51:50 +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
38fae0c97b
ls: Show file modes visually
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-26 18:22:50 +02:00
4dcee8f828
sh: Print "exit" on EOF only when the shell is in interactive mode
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-26 17:29:41 +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
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
b61307e5cb
ls: Add -1 and --directory
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-23 14:53:38 +02:00
04d074538f
ls: Don't do caching now that password/group file reading is more reasonable
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 22:10:01 +02:00
597aada09e
ls+stat: Handle symbolic links properly
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 21:49:25 +02:00
4ec1af5e51
apps: Add ln 2023-05-20 21:49:25 +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
5117b410db
apps: Add time
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 12:48:25 +02:00
1db60b5a82
sh: Print a message on exit
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 12:07:56 +02:00
3db0c4fed2
apps: Add ps
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-18 21:59:38 +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
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
e7d482e78a
kernel+init: Add a VFS mount system and auto-populate the devfs 2023-05-17 19:40:37 +02:00
65d3195caa
libos: Allow ArgumentParser users to specify they want leftover arguments
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-13 13:22:10 +02:00
5911b052dc
libluna: Add more options to to_dynamic_unit()
All checks were successful
continuous-integration/drone/push Build is passing
Also, make the output look more like how it is on linux.
2023-05-13 12:01:09 +02:00
a5ad8e16de
ls: Add the --human-readable flag 2023-05-13 11:15:28 +02:00
300d68088b
libos: Add FileSystem::stat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-12 23:47:20 +02:00
1035b91a3d
su: Do not change directory/set variables by default, instead add a --login option
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-11 20:11:09 +02:00
a935039e78
sh: Prioritize /etc/passwd over the USER environment variable 2023-05-11 20:10:10 +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
cd86d1d6d0
apps+initrd: Add a login utility and make it run at startup 2023-05-06 22:03:50 +02:00
b742a08cbe
su: Set the USER and SHELL variables
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-06 12:19:54 +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
3eb78aa5f3
libos+init: Add a new Path class to handle both file descriptors and file paths
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 17:37:26 +02:00
d9b7e8edc0
init: Read and launch service files in order using sort()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-02 20:56:28 +02:00
6beea7f817
ls: Avoid printing an empty line when a directory is empty
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-02 11:00:28 +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
376247ba8a
libluna: Add String::from_string_view()
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 20:03:16 +02:00
53ec448e33
ls: Add the -l flag 2023-05-01 20:01:05 +02:00
48df90e636
libos+apps: Use os::*print* instead of (f)printf
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-01 19:32:00 +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
80914f0bb9
ArgumentParser: Add support for version information
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-28 16:33:05 +02:00
7c8f195088
base64: Rename --allow-garbage to --ignore-garbage
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-26 22:37:55 +02:00
9d33e22ae0
apps: Add base64 2023-04-26 20:58:04 +02:00
cb28e2a385
libos: Add a convenience function for opening a file or standard input 2023-04-26 20:41:03 +02:00
5b69ce554c
init: Add a few more configuration options for services
All checks were successful
continuous-integration/drone/push Build is passing
Notably, redirecting a service's standard streams and waiting for a service to finish before continuing boot.
2023-04-25 21:00:12 +02:00
b8ca749a6c
su: Default to root if no username is provided
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-24 22:24:07 +02:00
919c9dd3cf
sh: Build a more elaborate prompt using the system hostname and username
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-24 22:13:06 +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
cf8a8c145a
init: Remove redundant continue statement
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-23 21:15:23 +02:00
c075aa77b9
init: Allow empty lines in service files 2023-04-22 15:19:37 +02:00
257c2ffd0a
init: Add a configurable service system instead of always starting /bin/sh
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-22 13:56:08 +02:00
841fc25137
kernel+init: Add a framebuffer special device file
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-21 18:18:15 +02:00
58dc23e4d9
apps: Add stat
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-21 18:04:17 +02:00
15b76f94f4
chown: Parse the owner and group properly
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-20 20:08:49 +02:00
eb58b4acc8
libos: Add support for --help to ArgumentParser
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 19:16:45 +02:00
d56e8baca5
libos+rm: Add recursive removal of directories
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-19 18:20:44 +02:00
67e9543675
os: Add FileSystem::change_directory
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 18:46:19 +02:00
b7a0ad8ffb
sh: Remove stray variable
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 18:43:50 +02:00
00832163d4
libos: Add Process::exec
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 18:39:37 +02:00
6ce125d286
libos: Add a Process class
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 18:16:24 +02:00
fbb7de7156
sh: Do not leak memory when using cd
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 16:49:05 +02:00
4baee3a91f
sh: Close script file on exec 2023-04-18 16:42:43 +02:00
407e81b107
cat: Read into buffers instead of lines 2023-04-18 16:41:58 +02:00
1733fc810d
mkdir: Use os::FileSystem and add -p flag
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-13 18:33:56 +02:00
fb3430c56a
apps: Use os::FileSystem 2023-04-13 18:33:43 +02:00
60c6e764a4
libos+apps: Add some missing functionality to File and eliminate any trace of C from cat and edit
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-13 17:31:21 +02:00
26ff964ec1
libos: Add a new main() function 2023-04-13 17:04:59 +02:00
d97bf991d1
libos: Add a very bare-bones C++ RAII File class 2023-04-12 21:46:10 +02:00
3618a41bcd
apps: Add rm
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-12 18:11:43 +02:00
1b4f48b92c
sh: Display the working directory as part of the prompt
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-11 22:45:33 +02:00
3a45f4af53
su: Change the current directory to the user's home on login
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-11 22:15:46 +02:00
dfce93c18f
ls: List the current directory by default instead of the root directory 2023-04-11 22:13:54 +02:00
66c2896652
su: Use termios ioctls to turn off echoing and read a password
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-09 11:24:34 +02:00
46be0bd458
apps: Install su as setuid
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-08 17:01:26 +02:00
8b45766aaa
su: Use user names and read from the password file instead of using raw user IDs 2023-04-08 16:31:33 +02:00
3867a29a10
apps: Add mkdir, chown and chmod
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-08 14:47:58 +02:00