summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/init/main.c3
-rw-r--r--usr.sbin/install/install.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/init/main.c b/usr.sbin/init/main.c
index b5c4fab..e1ee4d8 100644
--- a/usr.sbin/init/main.c
+++ b/usr.sbin/init/main.c
@@ -46,6 +46,7 @@ main(int argc, char **argv)
start_argv[1] = NULL;
/* Start the login manager */
- spawn(login_argv[0], login_argv, envp, SPAWN_WAIT);
+ spawn(login_argv[0], login_argv, envp, 0);
+ for (;;);
return 0;
}
diff --git a/usr.sbin/install/install.c b/usr.sbin/install/install.c
index 91f75df..803c864 100644
--- a/usr.sbin/install/install.c
+++ b/usr.sbin/install/install.c
@@ -32,6 +32,7 @@
#include <sys/fbdev.h>
#include <sys/reboot.h>
#include <sys/spawn.h>
+#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h>
@@ -85,6 +86,7 @@ pre_installer(void)
char *argv[] = { "/usr/bin/osh", NULL };
char *envp[] = { NULL };
char c;
+ pid_t child = -1;
puts("[S]hell/[I]nstall");
for (;;) {
@@ -92,13 +94,17 @@ pre_installer(void)
if (c == 's') {
puts("\033[0m");
installer_clearscr(0x000000, false);
- spawn(argv[0], argv, envp, SPAWN_WAIT);
+ child = spawn(argv[0], argv, envp, 0);
installer_clearscr(INSTALLER_BG, true);
break;
} else if (c == 'i') {
break;
}
}
+
+ if (child > 0) {
+ waitpid(child, NULL, 0);
+ }
}
static void