Kernel: Restart if init exits
This commit is contained in:
parent
7e9744419e
commit
51665a04b7
@ -7,6 +7,7 @@
|
||||
#include "memory/PMM.h"
|
||||
#include "memory/VMM.h"
|
||||
#include "misc/hang.h"
|
||||
#include "misc/reboot.h"
|
||||
#include "misc/utils.h"
|
||||
#include "panic/Panic.h"
|
||||
#include "std/assert.h"
|
||||
@ -280,6 +281,7 @@ void Scheduler::task_exit(Context* context, int64_t status)
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else { reboot(); }
|
||||
task_yield(context);
|
||||
}
|
||||
|
||||
@ -298,6 +300,7 @@ void Scheduler::task_misbehave(Context* context, int64_t status)
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else { reboot(); }
|
||||
task_yield(context);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user