diff options
author | WlodekM <[email protected]> | 2025-02-14 20:04:17 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2025-02-14 20:04:17 +0200 |
commit | fa71d9ab15c046f2e0b886bc365310f2ccf79800 (patch) | |
tree | d5b4f02e9bc732d9aab4b96482e343af479f38b7 /sbin/init/init.c | |
parent | 50dd5f54d89c0902fdb8143c4ed91ea613f34b18 (diff) |
fdmaker
Diffstat (limited to 'sbin/init/init.c')
-rw-r--r-- | sbin/init/init.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c index 9f97918..0e8f6cf 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,2 +1,19 @@ -//TODO -int main() {return 0;} \ No newline at end of file +#include <unistd.h> + +int main() { + write(1, "nyaOS init process started\n", 28); + __pid_t forkResult = fork(); + if (forkResult == 0) { + //TODO - eventually add device scan + // __pid_t forkResult = fork(); + // if (forkResult == 0) { + // execve("/sbin/", 0, 0) + // } else { + // execve("/sbin/", 0, 0) + // } + // make tty1 + execve("/sbin/fdmaker", 0, 0); + } else { + pause(); + } +} \ No newline at end of file |