diff options
author | Anton Kling <anton@kling.gg> | 2024-11-28 00:06:09 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-11-28 00:12:17 +0100 |
commit | 54869df7835565d0983096f65326cdd2d5f4f3d8 (patch) | |
tree | 3124d37d170bb14bfcc315442e410c0b76a05cf1 /userland/minibox/utilities | |
parent | 5fdba54196c7171ddebb29aef597b965a1b1ead1 (diff) |
changes
Diffstat (limited to 'userland/minibox/utilities')
-rw-r--r-- | userland/minibox/utilities/init.c | 9 | ||||
-rw-r--r-- | userland/minibox/utilities/sh/sh.c | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/userland/minibox/utilities/init.c b/userland/minibox/utilities/init.c index 07dfce7..ce65387 100644 --- a/userland/minibox/utilities/init.c +++ b/userland/minibox/utilities/init.c @@ -63,10 +63,13 @@ int init_main(void) { printf("minibox init must be launched as pid1.\n"); return 1; } - if (fork()) - for (;;) + if (fork()) { + for (;;) { wait(NULL); + msleep(10000); + } + } char *a[] = {NULL}; - execv("/ws", a); + execv("/init.sh", a); return 1; } diff --git a/userland/minibox/utilities/sh/sh.c b/userland/minibox/utilities/sh/sh.c index f907cc2..e129044 100644 --- a/userland/minibox/utilities/sh/sh.c +++ b/userland/minibox/utilities/sh/sh.c @@ -162,7 +162,7 @@ int sh_main(int argc, char **argv) { int fd = open(argv[1], O_RDONLY, 0); char buffer[8192]; struct sb file; - sb_init(&file, 256); + sb_init(&file); for (;;) { int rc = read(fd, buffer, 8192); @@ -186,7 +186,7 @@ int sh_main(int argc, char **argv) { char buffer[256]; printf("%s : ", getcwd(buffer, 256)); struct sb line; - sb_init(&line, 256); + sb_init(&line); get_line(&line); { struct TOKEN *h = lex(SB_TO_SV(line)); |