Fix missing WEXITSTATUS in init and kernel.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-09-09 23:08:03 +02:00
parent 66487f2895
commit 0b94239912
2 changed files with 4 additions and 1 deletions

View File

@ -32,6 +32,7 @@
#include <sortix/kernel/textbuffer.h>
#include <sortix/kernel/pci.h>
#include <sortix/kernel/worker.h>
#include <sortix/wait.h>
#include <libmaxsi/error.h>
#include <libmaxsi/memory.h>
#include <libmaxsi/string.h>
@ -331,6 +332,8 @@ static void BootThread(void* /*user*/)
if ( pid != init->pid )
PanicF("Waiting for init to exit returned %i (errno=%i)", pid, errno);
status = WEXITSTATUS(status);
switch ( status )
{
case 0: CPU::ShutDown();

View File

@ -55,7 +55,7 @@ int runsystem()
printf("Looks like the system crashed, trying to bring it back up.\n");
return runsystem();
}
return status;
return WEXITSTATUS(status);
}
int ret = child();