summaryrefslogtreecommitdiff
path: root/usr.sbin/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/init/main.c')
-rw-r--r--usr.sbin/init/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/init/main.c b/usr.sbin/init/main.c
index a136740..bec44ef 100644
--- a/usr.sbin/init/main.c
+++ b/usr.sbin/init/main.c
@@ -27,8 +27,20 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/spawn.h>
+#include <stddef.h>
+
+#define SHELL_PATH "/usr/bin/osh"
+#define INIT_RC_PATH "/usr/rc/init.rc"
+
int
main(void)
{
+ char *argv[] = { SHELL_PATH, INIT_RC_PATH, NULL };
+ char *envp[] = { NULL };
+
+ spawn(SHELL_PATH, argv, envp, SPAWN_WAIT);
+ argv[1] = NULL;
+ spawn(SHELL_PATH, argv, envp, SPAWN_WAIT);
return 0;
}