X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fsystem.c;h=db7da340ed79265e63bb29ffe67d336fcb3ab5b0;hb=cb414d6f5f9730d64b4914e45c14d9c16aea0b6c;hp=d8eba8333db4ae5a67d9a6e8d71a888f9cf1e768;hpb=934d0f535e1929fd90ae0606e77794484aa55284;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/system.c b/KernelLand/Kernel/system.c index d8eba833..db7da340 100644 --- a/KernelLand/Kernel/system.c +++ b/KernelLand/Kernel/system.c @@ -6,6 +6,7 @@ */ #define DEBUG 0 #include +#include // === IMPORTS === extern void Arch_LoadBootModules(void); @@ -44,7 +45,12 @@ void System_Init(char *CommandLine) // - Execute the Config Script Log_Log("Config", "Spawning init '%s'", gsInitBinary); - Proc_Spawn(gsInitBinary); + if(Proc_Clone(CLONE_VM|CLONE_NOUSER) == 0) + { + const char *args[] = {gsInitBinary, 0}; + Proc_Execve(gsInitBinary, args, &args[1], 0); + Log_KernelPanic("System", "Unable to spawn init '%s'", gsInitBinary); + } // Set the debug to be echoed to the terminal Log_Log("Config", "Kernel now echoes to VT7 (Ctrl-Alt-F8)");