Halt system on shell exit
This commit is contained in:
parent
146e7f65ca
commit
bae44d0333
1 changed files with 3 additions and 1 deletions
|
@ -54,7 +54,9 @@ main(void)
|
||||||
// or if a parentless process exits.
|
// or if a parentless process exits.
|
||||||
wpid = wait((int *)0);
|
wpid = wait((int *)0);
|
||||||
if(wpid == pid) {
|
if(wpid == pid) {
|
||||||
// the shell exited; restart it.
|
// FIXME: Obviously not how things should be done
|
||||||
|
printf("\nShell exited... Halting\n");
|
||||||
|
halt();
|
||||||
break;
|
break;
|
||||||
} else if(wpid < 0) {
|
} else if(wpid < 0) {
|
||||||
printf("init: wait returned an error\n");
|
printf("init: wait returned an error\n");
|
||||||
|
|
Loading…
Reference in a new issue