diff options
Diffstat (limited to 'sbin/init/init.c')
-rw-r--r-- | sbin/init/init.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c new file mode 100644 index 0000000..168d011 --- /dev/null +++ b/sbin/init/init.c @@ -0,0 +1,26 @@ +#include <unistd.h> +#include <signal.h> + +int main() { + sigset_t set; + int status; + write(1, "nyaOS init process started\n", 28); + sigfillset(&set); + sigprocmask(SIG_BLOCK, &set, 0); + if (fork()) pause(); + //TODO - eventually add device scan + if (!fork()) execve("/sbin/devscan", 0, 0); + + sigprocmask(SIG_UNBLOCK, &set, 0); + + // setsid(); + setpgid(0, 0); + + write(1, "press RETURN to\n\n", 17); + char a[2] = {0}; + read(0, a, 1); + // make tty1 + execve("/sbin/fdmaker", 0, 0); + // execve("/sbin/devscan", 0, 0); + // execve("/sbin/fdmaker", 0, 0); +} \ No newline at end of file |